Flash actionscript 3.0: pre Loader in AS 3 .0

pre Loader in AS 3 .0

Posted by Sankar.G | Posted in | Posted on 4:26 PM

var percentage:Number=0;
stage.addEventListener(Event.ENTER_FRAME,BeeMoving);
function BeeMoving(event:Event):void
{
var nLoadedBytes:Number = loaderInfo.bytesLoaded;
var nTotalBytes:Number = loaderInfo.bytesTotal;
percentage= Math.round(nLoadedBytes / nTotalBytes * 100);
BitsLoaded.text = nLoadedBytes+"kbs /"+nTotalBytes+"kbs";
if (nLoadedBytes==nTotalBytes) {
stage.removeEventListener(Event.ENTER_FRAME,BeeMoving);
gotoAndStop(2);
}
}

Comments (0)