Posted By

jrobinsonc on 01/13/10


Tagged

flash loading


Versions (?)

Flash Loading Script


 / Published in: ActionScript
 

  1. onSelfEvent (load)
  2. {
  3. total = _root.getBytesTotal();
  4. percent = 80;
  5. }
  6. onSelfEvent (enterFrame)
  7. {
  8. loaded = _root.getBytesLoaded();
  9. //percent = int(loaded/total*100);
  10. percent++;
  11. loading_text.text = percent+"%";
  12. loading_box.gotoAndStop(percent);
  13. if (percent == '100') {
  14. _root.gotoAndPlay(2);
  15. }
  16. }
  17. onFrame (1)
  18. {
  19. stop();
  20. }

Report this snippet  

You need to login to post a comment.