Posted by Sankar.G | Posted in AS3 | 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);
}
}
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)
Post a Comment