Requirements:
Actionscript 3 Only
Adding the Preloader
If you want the preloader for your main movie:
- Open your Flash Document (.fla)
- Select (File –> Import… –> Open External Library)
- Find and Select CometPreloaderLibrary.fla in the CometPreloader Folder
- Drag the ‘Comet Preloader’ Folder into your document’s library.
- Now you need your Actionscript files: Drag ‘CometPreloader.as’ and ‘Spinning Comet.as’ and drag it into the same folder your main .fla file is in.
- Create a blank key frame for the first frame of your movie. You create a blank key frame by going to your time line -> right-click -> Create Blank Key frame. This is where you’re going to drag the Comet Preloader into. You can have other objects inside this first frame, but keep in mind it’s going to have to load before it can display. You don’t want a black screen staring at you for too long!
- Open the ‘Comet Preloader’ folder that is now in your Flash library and drag the ‘CometPreloader’ Movieclip onto the stage.
- Your DONE!
For AS3 Programmers: If you want your the preloader to display the progress from a Loader instance:
1. Make sure you’ve imported the external library into your Flash or Flex Document.
Here is how code is typically written. To incorporate the preloader:
var loader:Loader = new Loader();
loader.load(new URLRequest(’images/black_demo_bg.png’));
addChild(loader);
var preloader:CometPreloader = new CometPreloader(trailColor:uint,
textColor:uint,
loader:Loader);
addChild(preloader)
Very Easy Stuff. The Preloader had a TextField and Bitmap instance within it. Feel free to mess with it.
Customizing the Preloader
- To Change the Text, double-click the ‘CometPreloader’ on the stage and change the TextField properties (except changing its instance name)
- To change background, just double-click the ‘CometPreloader’ on the stage, delete the current background and add in a new one by dragging a bitmap from the ‘Comet Preloader’ folder that was imported. Once its dragged in, make sure its centered on the stage and its behind the text.
- To change the Comet Color, give the preloader an instance name by going into the Properties Inspector and writing it below where it says ‘MovieClip’. Now go over to the frame where you placed the preloader and add this code: instanceName.cometColor(cometColor:uint, textColor:uint);
Preloader Public Properties:
trailColor:uint – Color of the spinning light (comet)
textColor:uint – Quick property to change the color of the text. You can just as easily edit the TextField instance within the PreloaderComet instance with the Flash IDE or AS3.
loader:Loader – Set to null by default. If you set it to a loader, it will take its contentLoaderInfo and show its status within the preloader. It’s awesome.
goToFrame:uint – After you drop the CometPreloader into the first frame, change this property to tell your movie to go to the frame specified after loading is complete. Default Is set to 2 (next frame);



(X)HTML