Re: [Flashcoders] Finding the height and width of the VISIBLE area of a masked SWF

2007-04-19 Thread Robert Brisita
With your second explanation, the problem you are having is clearer.  
About a year ago, I developed an application where I had a container 
that loaded SWFs from other developers.  I contacted all the developers 
with the dimensions and the FPS the SWF container is being built on and 
sent them an API
to communicate with the container.  It made my life a little easier.  
The problem was that some developers didn't conform to the API or read 
the docs, which led to last minute phone conferences to explain how to 
use the API, but that is besides the point.


Because you have no control of those properties, I believe there isn't a 
viable fix other than getting the loaded SWF dimensions from the 
movieclip reference.  From what I remember; if the SWF you are loading 
is built at a faster FPS than your container they will run slower and 
the loaded SWF may not account for that.  Example; your container is 12 
FPS and the loaded SWF is 24 FPS, the loaded SWF will run at 12 FPS.  
They might not be checking the current FPS and adjust their parameters 
for time based movement.


The only other thing I can think of, but I haven't dealt with was 
changing the scale mode of the stage to showAll or exactFit.  I am 
not sure this will help though and this will affect the container SWF as 
well.


Let me know if you do figure this out another way, I would be 
interesting to know.


Cheers,
Rob.

matt stuehler wrote:

Claus,

That's a great suggestion - the best answers are often the overlooked,
obvious ones.

But I don't think so - in the original SWFs, the masks aren't
movieclips - they're just fills. So, I don't know how you'd check
their width or height.

The key thing about the application is that I won't know anything
about the SWFs that are being loaded.

My app should simply load a swf into a container movieclip, then
attempt to scale it to fit the stage, and center it.

Ordinarily, I can just check the container._width and
container._height to accomplish this. But I've tested a few SWFs that
weren't working properly, and that's when I discovered that they were
using masks, which throws off the _width and _height.

I can't assume that the SWFs will use a movieclip as a mask.

Thanks again for your advice.

Cheers,
Matt




On 4/18/07, Claus Wahlers [EMAIL PROTECTED] wrote:


 I'd like to be able to find the VISIBLE height and width of those
 SWFs; however _width and _height return the size of ALL the masked
 content.

Can't you just check the width/height of the mask?

Cheers,
Claus.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br/
http://wahlers.com.br/claus/blog/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Finding the height and width of the VISIBLE area of a masked SWF

2007-04-18 Thread matt stuehler

All,

It looks like this has been asked before, but I couldn't find an answer.

I'm creating a Flash app that loads several SWFs.

Those SWFs contain use masks.

I'd like to be able to find the VISIBLE height and width of those
SWFs; however _width and _height return the size of ALL the masked
content.

In other words, if the SWF has a stage size of 400x300, and a mask of
400x300, but the total size of the SWF is 800x600 (e.g., b/c of
off-stage content, or stuff that's not visible thru the mask), then
_width returns 800, and _height returns 600.

I can see why that's sometimes useful, but in this particular
application, I need to know the VISIBLE size.

For example, I'd like to be able to center the VISIBLE part of the SWF
on the stage.

Is there any way to figure that out?

Cheers,
Matt Stuehler
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Finding the height and width of the VISIBLE area of a masked SWF

2007-04-18 Thread Claus Wahlers



I'd like to be able to find the VISIBLE height and width of those
SWFs; however _width and _height return the size of ALL the masked
content.


Can't you just check the width/height of the mask?

Cheers,
Claus.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br/
http://wahlers.com.br/claus/blog/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Finding the height and width of the VISIBLE area of a masked SWF

2007-04-18 Thread matt stuehler

Claus,

That's a great suggestion - the best answers are often the overlooked,
obvious ones.

But I don't think so - in the original SWFs, the masks aren't
movieclips - they're just fills. So, I don't know how you'd check
their width or height.

The key thing about the application is that I won't know anything
about the SWFs that are being loaded.

My app should simply load a swf into a container movieclip, then
attempt to scale it to fit the stage, and center it.

Ordinarily, I can just check the container._width and
container._height to accomplish this. But I've tested a few SWFs that
weren't working properly, and that's when I discovered that they were
using masks, which throws off the _width and _height.

I can't assume that the SWFs will use a movieclip as a mask.

Thanks again for your advice.

Cheers,
Matt




On 4/18/07, Claus Wahlers [EMAIL PROTECTED] wrote:


 I'd like to be able to find the VISIBLE height and width of those
 SWFs; however _width and _height return the size of ALL the masked
 content.

Can't you just check the width/height of the mask?

Cheers,
Claus.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br/
http://wahlers.com.br/claus/blog/
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com