Color Code final working!

Here is a simple actionscript 3.0 preloader to demostrate that the code with color hightlighting is finally working!

I am using CodeColorer This is a great plugin, which allows you to color your code, provides links to the docs for keywords, and also allows lin numbers.


stop();



this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);

this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);



function onProgress(e:ProgressEvent):void{

	var loaded:Number = e.target.bytesLoaded;

	var total:Number = e.target.bytesTotal;

	var pct:Number = loaded/total;

	loader_mc.scaleX = pct;

	loaded_txt.text = "Loading... " + (Math.round(pct * 100)) + "%";

}



function onComplete(e:Event):void{

	nextFrame();

}

3 thoughts on “Color Code final working!”

Leave a Reply