Return to Snippet

Revision: 33037
at October 5, 2010 13:17 by heathbo

Initial Code
addEventListener(Event.ENTER_FRAME, loading);

function loading(event:Event)
	var bytestotal = stage.loaderInfo.bytesTotal;

	var bytesloaded = stage.loaderInfo.bytesLoaded;

	var loader = Math.round(bytesloaded*100/bytestotal);

	moviePreloader_mc.LoaderMask.scaleX = loader/100;
	moviePreloader_mc.percent2.text = int(loader)+"%";

	if (bytesloaded == bytestotal)
		removeEventListener(Event.ENTER_FRAME, loading);

Initial URL

Initial Description
add every item in the library to the frame that comes after this code.

Initial Title
How to create a Loader

Initial Tags

Initial Language
ActionScript 3