Return to Snippet

Revision: 18696
at October 6, 2009 10:53 by adamcoulombe


Initial Code
this.onEnterFrame = function() {
	filesize = myMovieClip.getBytesTotal();
	loaded = myMovieClip.getBytesLoaded();
	preloader._visible = true;
	if (loaded != filesize) {
			percent = 100*loaded/filesize;
			preloader.preload_bar._xscale = percent;
		} else {
			preloader._visible = false;
			onMovieClipLoaded();
			delete this.onEnterFrame
	}
};

onMovieClipLoaded = function(){
trace("if you are reading this, the movieclip has been loaded");
}

Initial URL

                                

Initial Description

                                

Initial Title
Simple Preloader Setup for Actionscript 2

Initial Tags
actionscript, flash, simple

Initial Language
ActionScript