That sorta works. It's a way of getting notified when the properties
do finally get updated . But i still have to do if( swfLoader.width
!=0 && swfLoader.height != 0 ){ ... }. And since I really only need to
run that piece of code once, I would have to remove the listener after
the code successfully gets executed.

I still don't understand why calling swfLoader.validateNow() does not
work when I try to call it in the 'complete' handler.

Jamie

On Thu, Jun 18, 2009 at 5:29 PM, Gordon Smith<gosm...@adobe.com> wrote:
>
>
> Try checking the values in an "updateComplete" handler.
>
>
>
> Gordon Smith
>
> Adobe Flex SDK Team
>
>
>
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jamie S
> Sent: Thursday, June 18, 2009 3:27 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] my SWFLoader wont give me the correct width and height
>
>
>
>
> I'm using a SWFLoader to load in an image and i have a handler
> function for COMPLETE. In this load complete handler, i'm trying to
> get the size of the SWFLoader instance by using swfLoader.width,
> swfLoader.height but it always gives me 0. if I set a breakpoint, i
> can see that the $width and $height protected properties are correct
> but no matter what I do I can't get the public width and height
> properties to update. i've tried using validateNow(),
> invalidateSize(), validateSize() and whatever else I can think of but
> the width and hight are still always 0. And I noticed that if i check
> the width and height at some later point in the program, the values
> are correct.
>
> Does anybody know how to force SWFLoader to update its width and height?
>
> Jamie
>
> 

Reply via email to