A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: flash loader in firefox locking up on the first frame?!?!

  1. #1
    Junior Member
    Join Date
    Jan 2010
    Posts
    20

    Unhappy flash loader in firefox locking up on the first frame?!?!

    hey im doing a website and using a flash header. this has some movie clips and it needed a loader. in Firefox it will lock up when clicking from page to page and stop on the full loader bar. im using cs3 master collection and as3 the website is paradisebeergarden.ph this is driving me nuts as it is only doing this in Firefox! thanks!!!!

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    if i delete cache and reload, it works - this leads me to believe you need to add a complete handler in addition to the progress handler, that reacts as if the preload executed all the way

  3. #3
    Junior Member
    Join Date
    Jan 2010
    Posts
    20
    hey thanks for your reply. here is my code that is located in the actions layer first frame the loader is the only thing located in frame one in the root. here is my code

    stop();

    this.loaderInfo.addEventListener(ProgressEvent.PRO GRESS, onProgress);
    this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);

    function onProgress(e:ProgressEvent):void
    {
    var loaded:Number = e.target.bytesLoaded;
    var total:Number = e.target.bytesTotal;
    var pct:Number = loaded/total;
    loader_mc.scaleX = pct;
    loaded_txt.text = "Loading... " + (Math.round(pct * 100)) + "%";
    }

    function onComplete(e:Event):void
    {
    play();
    }

    its driving me crazy.

    I wanted a background to the loader and was using a more compressed version of the header all on the bottom layer but the loader wasn't showing up until 30% which to me is unacceptable so now im just trying to get the loader to initiate correctly. Im sure its something silly. my loader is in the root time line should it be in its own movie clip and called to in the code?

    sorry for all the questions i sure do appreciate your help.

  4. #4
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    hmm i don't see anything obviously wrong, but i don't use frames so i might not be noticing something... i guess i'd suggest separating the components - put your main application structure in a separate FLA and load that using a Loader object in the file containing just the loader.

  5. #5
    Senior Member
    Join Date
    May 2004
    Posts
    226
    I've seen some flash player versions in some browsers not fire COMPLETE for some reason. You can use listeners for both INIT and COMPLETE to be safe:
    PHP Code:
    stop();

    loaderInfo.addEventListener(ProgressEvent.PROGRESSonProgress);
    loaderInfo.addEventListener(Event.INITonComplete);
    loaderInfo.addEventListener(Event.COMPLETEonComplete);

    function 
    onProgress(e:ProgressEvent):void {
        var 
    loaded:Number e.target.bytesLoaded;
        var 
    total:Number e.target.bytesTotal;
        var 
    pct:Number loaded/total;
        
    loader_mc.scaleX pct;
        
    loaded_txt.text "Loading... " + (Math.round(pct 100)) + "%";
    }
    function 
    onComplete(e:Event):void {
        
    loaderInfo.removeEventListener(ProgressEvent.PROGRESSonProgress);
        
    loaderInfo.removeEventListener(Event.COMPLETEonComplete);
        
    loaderInfo.removeEventListener(Event.INITonComplete);
        
        
    play();


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center