I’ve recently experienced problems on few AS3 websites. If you embed your SWF file with different WMode, like opaque or transparent in Firefox your Flash won’t load. Actually the Flash loads first frame and then it seems like it stops. Well, it certainly loads but the problem is that loaderInfo Event.COMPLETE and PROGRESS are not fired in Firefox.
That is LAME! Firefox has this “advanced” feature with Flash, it doesn’t load it until that browser tab has focus. Seems like we’re getting problem from there. Anyway, a workaround is to set the Event.ENTER_FRAME function that will check loader
addEventListener(Event.ENTER_FRAME, _listenLoading);// on enter frame to check if it’s loaded private function _listenLoading(e:Event):void { if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal) { removeEventListener(Event.ENTER_FRAME, _listenLoading); _onSiteLoaded(); } }
Thanks! This info was very helpful to me. 🙂
Thanks! Good to know. There’s another problem with the stage dimensions and FF3. Shortly after the SWF loads, the stage.stageWidth and stage.stageHeight are both equal zero. That could be a problem i.e. when centering the preloader. The fix is simple:
Thanks for that mate, very useful bit of code there.
thanks! i faced the same problem, but your this useful information helps me out.
thanks a lot.
regards
Sherest
https://bugs.adobe.com/jira/browse/SDK-12415
This is indeed a bummer, but it has the same issues with IE7/IE8 but then stageWidth=0, so workarounds can be an enterframe like you said or use ADD-events. More info/workarounds at https://bugs.adobe.com/jira/browse/FP-434 and https://bugs.adobe.com/jira/browse/FP-2641.
Really too bad that some of the most basic parts of the Flash Player differ between browsers.
😦
Ran into a similar issue that Og2t mentioned. If my swfs (multiple embedded video players) weren’t immediately visible in Firefox, their stage was 0. Solution was to use the Event.ENTER_FRAME listener to check the values of stage.stageWidth and stage.stageHeight before I ran any resizing functions which depended on accurate stage values.
Доставка любых товаров, грузов и оборудования из Китая по всей России, таможенная очистка и сертификация. Объем от 10 куб.м. или вес от 2т. Многолетний опыт, оптимальные цены и сроки. 100% официально и надёжно! Ваш № телефона на почту или майл-агент dostavkatovarovСОБАКАmail.ru, или на ICQ 271-272-525 и мы Вам позвоним!
Hello, I figured this was a timing issue since FireFox seemed to be killing my events somehow… This is a good workaround and I recommend it to anyone having the same problem. Thank you very much for posting this.