Flash Per-loader Not show or loading

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Eben Meyers
    New Member
    • Feb 2012
    • 1

    #1

    Flash Per-loader Not show or loading

    My per-loader is not working, in that when u load the page it just is blank and then after shows the first frame that the frame is on and then goes onto the next frame.

    Look at my problem at:

    Code I'm using:
    _______________ _______________ _______________ __________

    stop();

    addEventListene r(Event.ENTER_F RAME, preLoad)

    function preLoad(event:E vent):void{
    var bytestoLoad:Num ber = loaderInfo.byte sTotal;
    var numberLoaded:Nu mber = loaderInfo.byte sLoaded;
    if (bytestoLoad == numberLoaded){
    removeEventList ener(Event.ENTE R_FRAME, preLoad)
    gotoAndStop(2);
    } else {
    preLoader.preLo aderFill.scaleX = numberLoaded/bytestoLoad;
    preLoader.bytes Percent.text = Math.floor(numb erLoaded/bytestoLoad*100 ) + "% Loaded";
    }
    }

    _______________ _______________ _______________ _______

    Can someone help?
  • manusachu
    New Member
    • Apr 2012
    • 1

    #2
    stop();
    stage.addEventL istener(Event.E NTER_FRAME, update);
    function update(e:Event) :void{
    var loadedBytes:Num ber=stage.loade rInfo.bytesLoad ed;
    var totalBytes:Numb er=stage.loader Info.bytesTotal ;

    progress_mc.sca leX=loadedBytes/totalBytes;
    percent_txt.tex t= Math.floor((loa dedBytes/totalBytes)*100 )+"%";

    if(loadedBytes == totalBytes){
    gotoAndStop(2);
    stage.removeEve ntListener(Even t.ENTER_FRAME, update);
    }


    }
    use this..:)

    Comment

    • Fary4u
      Contributor
      • Jul 2007
      • 273

      #3
      or you can define the Scene as your target,
      if(loadedBytes == totalBytes){
      gotoAndStop(2, "Scene 1");
      stage.removeEve ntListener(Even t.ENTER_FRAME, update);
      }

      Comment

      Working...