If the SWF has more than one frame, or draws outside of its reported screen 
size, you can have issues like this.  Once you know how big the SWF is, try 
calling invalidateDisplayList on the SWFLoader.  If that doesn't help, then try 
centering the SWFLoader in some other container

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of 
tchredeemed
Sent: Tuesday, November 04, 2008 8:29 AM
To: [email protected]
Subject: [flexcoders] SWFLoader problems!


I have a .swf that I load into my flex app...

like this:

[Embed(source="swfloader.swf")]
[Bindable]
private var swfLoaderAnimation:Class;

<mx:SWFLoader id="loader" source="{swfLoaderAnimation}"
horizontalCenter="0" verticalCenter="0" />

-----------------------

The problem(s):

1- Sometimes this swfloader is bigger than the actual swf, and if i
scaleX and scaleY to 0.5, it is the appropriate size. Other times,
however, it is the correct size, and scaling it makes it far too
small... This even happens on the same custom component sometimes :(

2- I do not believe that flex actually knows how tall/wide this swf
is, because the horizontalCenter and verticalCenter seem to center the
top left pixel of the swf instead of the entire swf... if I put it
inside of a hbox with a border, and center that, it shows that the swf
runs off the bottom/right edges of the hbox...

Any help? Thanks :)

Reply via email to