Hey

I've struggled a lot with this. Are you running Firefox, because this is 
the only browser where I still get the error.

I always setup a Timer in my Document Class and check if(stage) before 
continuing. That solves it.

I don't think it's a SFObject error, more a Firefox error.

Med venlig hilsen / Kind regards

Rune Skjoldborg Madsen
Freelance web designer / developer

[email protected]
www.runemadsen.com
(+45) 61 71 34 50
Falkoner Alle 73A, 5th floor
2000, Frederiksberg
Denmark




Kostas Chatzikokolakis wrote:
> Hello,
>
> I'd like to share my experience regarding the stage.stageWidth bug.
> Using SWFObject 2.2 in IE7 or IE8, if I reload the page containing my
> swf, stage.stageWidth returns 0 when the swf is loaded. This is exactly
> as mentioned in the faq. The faq says that this can be solved by adding
> a resize event listener. The listener is supposed to be called by the
> flash player many times until at some point the correct stagewidth is
> returned.
>
> This is however NOT happening in my case. Using the code from the faq,
> the listener is only called once and inside the listener I still get
> stageWidth = 0.
>
> I solved this issue by creating an interval that is called after 50
> msecs. Even in the very first call stageWidth returns the correct value.
>
> I attach a simple .fla created with Flash CS3 prof. It shows the
> stageWidth when the swf loads, when the resize handler is called and
> when the interval is called. In the former two I get 0 but in the
> interval I get the correct value.
>
> It would be great if other people could try it. Note that you need to
> *refresh* the page for the bug to appear, the first time it doesn't happen.
>
> I think this should be added in the faq for other people who have the
> same problem. It would be even better of course if SWFObject could load
> the player in some way that avoids the bug completely (as it is the
> case, for exampe, of the static method).
>
> Cheers,
> Kostas
>
>
>
>
>
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to