1. Home
  2. Computing & Technology
  3. Animation

Flash Animation 13: Creating a Simple Preloader

By Adrien-Luc Sanders, About.com

7 of 9

Adding the Preloader Code

Now on frame one on the movie clip stage, open your Actions pane and insert the following code:

play() ;
loaded = _root.getBytesLoaded() / _root.getBytesTotal * 100;
if(loaded != 100){
setProperty(Loader, _xscale, loaded) ;
}else{
gotoAndStop(3) ;
}

This is the real workhorse of the lesson, and the preloader; everything else has just been setup to create the various parts for this code to act upon.

Explore Animation
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Animation 13: Creating a Simple Preloader

©2009 About.com, a part of The New York Times Company.

All rights reserved.