A More Complicated Preloader

Steps for complicated pre-loading:

1. The actual movie starts on the 3rd frame. The 1st frame is for the preloader. The 2nd frame is for loading the codes and stuff

2. To set the 2nd frame as the part to load the bulks, set Publish Settings>Flash>Settings>Export Frame for Classes, set it to 2.

3. Set the linkage of library symbols to not load on first frame.

4. Create a preloader graphics and put it into the first frame.

5. Add actionscript in to the main timeline.

this.onEnterFrame = function()
{
var amount:Number = this.getBytesLoaded()/this.getBytesTotal() * 100;
preloader._xscale = amount;

if(amount == 100)
{
preloader._alpha-=5;
if(preloader._alpha < 0)
{
this.gotoAndPlay(3);
delete this.onEnterFrame;
}
}
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s