Skip to main content
May 4, 2010
Question

loaderinfo Event.COMPLETE not being called infirefox.. sometimes?

  • May 4, 2010
  • 2 replies
  • 924 views

Hi guys,

I've createa  simple flash banner (FL10, CS4) that is used stored in multiple locations on a server, which is sent a relative path to an XML file via FlashVars. relative path images are then loaded from this xml file.

the base class for the banner is

Thins all works fine locally and in IE but in Firefox it fails about half the time to trigger the loaderinfo  Event.COMPLETE  call.

why?  this is driving me insane.

(essence of the Base class below:)

public class Banner extends MovieClip {

        public function Banner() {
            this.loaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
        }
        private function loaderComplete($e:Event) {
           
            createDebug();                                        debugMe("init");
           
            var flashVars    = this.loaderInfo.parameters;
            var tNum:uint    = Math.round(100 * Math.random());
            xmlPath    = String(flashVars.xmlFileName)+"?param="+ Math.round(100 * Math.random());            debugMe("xmlPath|" + xmlPath);
           
             init();
        }

}

I've cut out the rest of the methods, but trust me it works perfectly in IE, Chrome etc. just FF.

Any ideas why flash wouldn't initialise, oh.  and if you refresh the page it loads straight away, I can't identify any pattern between locations or order of loading.

regards, Rich

This topic has been closed for replies.

2 replies

May 6, 2010

From what I can see you can probably just ditch the listener and move the stuff from loaderComplete into the constructor. loaderInfo.parameters are available right away - I always grab them straight in the constructor.

If you keep the listener for some reason you might try listening for Init rather than Complete... but again for what you're doing it's not needed.

May 6, 2010

update : no update, still can't find a solution to thios HUGELY paralysing

yet probably simple problem

Is there anyone out there who has the slightest clue WHY this might be happening or come across something similar before?

May 6, 2010

solved, app was running too quickly so change to Event.ADDED_TO_STAGE and now works fine