Return to Snippet

Revision: 5002
at February 3, 2008 20:18 by chrisaiv


Initial Code
var total:Number;
var loaded:Number;

this.onEnterFrame = function()
{
	total = _root.getBytesTotal();
	loaded = _root.getBytesLoaded();
	if(loaded >= total){
		delete(onEnterFrame);
		gotoAndStop(nextFrame());		
	}
};
stop();

Initial URL

                                

Initial Description
Let's say you want to place a Preloader in a frame before the actual Flash app or in a previous Scene, this is a really simple, ghetto way of doing it.

Initial Title
AS2: Simple Preloader

Initial Tags

                                

Initial Language
ActionScript