A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: AS2 | Preloader issues...

Threaded View

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    11

    AS2 | Preloader issues...

    Hi everybody, I just realized, that my preloader isn't actually working, and all thanks to trying to load the page on a PC with quite slow internet... The story is following - my preloader animation plays, but only after the whole movie is loaded, cuz I noticed a huge delay before the preloader was actually played... And then I used that flash speed testing thing (sorry, but I don't know how it's called) and it proved my theory...
    That's the code on 1-st frame, where preloader is:
    Actionscript Code:
    stop();
    var loaded:Number = getBytesLoaded();
    var total:Number = getBytesTotal();
    var percent:Number = Math.floor((loaded*100)/total);
    if (loaded == total){
    gotoAndPlay (2);
    }else{
        _preloader.gotoAndPlay(percent);
        //loadBar.percentage.text = percent;
    }

    And preloader itself has
    Actionscript Code:
    _parent.gotoAndPlay(2);
    on it's frame 100.

    Can anybody tell me, where is my mistake?
    Last edited by oojustinoo; 03-15-2010 at 10:15 PM.

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