Closed GoogleCodeExporter closed 9 years ago
That's the loading script i use.
// Import the required assets
import flash.display.*;
// Stop the playhead while loading occurs
this.stop();
//Create a listener to call the loading function as the movie loads
this.loaderInfo.addEventListener (ProgressEvent.PROGRESS, PL_LOADING);
/* This is the main function, basically it grabs the total and loaded bytes,
calculates a percentage, and displays it by stretching the bar and adjusting
the textfield display. */
function PL_LOADING(event:ProgressEvent):void {
var percent:Number=event.bytesLoaded/event.bytesTotal*100;
// Loading Bar progress
mc_LBar.scaleX=percent/100;
// Display the % loaded in textfield
LText.text=int(percent)+"%";
// Loading complete
if(percent==100){
this.gotoAndPlay("Start");
}
}
Original comment by i...@omnicreatura.com
on 4 Nov 2008 at 11:15
This is an authoring issue, please resublit it in the discussion group:
http://groups.google.com/group/swfobject
Original comment by bobbyvandersluis
on 4 Nov 2008 at 12:30
Original issue reported on code.google.com by
i...@omnicreatura.com
on 4 Nov 2008 at 11:09