1. Home
  2. Computing & Technology
  3. Animation

Flash Animation 13: Creating a Simple Preloader

By , About.com Guide

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

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. 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.