Another problem while building Flash AS3.0 Preloader.
This is the script i got from the net. It was meant for picture file ie. Jpeg i think...
QUOTE
stop();
stage.addEventListener(Event.ENTER_FRAME, update);
function update(e:Event):void {
var loadedBytes:Number = stage.loaderInfo.bytesLoaded;
var totalBytes:Number = stage.loaderInfo.bytesTotal;
progress_mc.scaleX = loadedBytes / totalBytes;
percent_txt.text = Math.floor((loadedBytes / totalBytes) * 100) + "%";
if (loadedBytes == totalBytes) {
gotoAndPlay(5) ;
stage.removeEventListener(Event.ENTER_FRAME, update);
}
}
stage.addEventListener(Event.ENTER_FRAME, update);
function update(e:Event):void {
var loadedBytes:Number = stage.loaderInfo.bytesLoaded;
var totalBytes:Number = stage.loaderInfo.bytesTotal;
progress_mc.scaleX = loadedBytes / totalBytes;
percent_txt.text = Math.floor((loadedBytes / totalBytes) * 100) + "%";
if (loadedBytes == totalBytes) {
gotoAndPlay(5) ;
stage.removeEventListener(Event.ENTER_FRAME, update);
}
}
When I replace the Jpeg image with movie clip, the preloader gone cacat. I know this after simulating it under flash player. should if its not a movie clip, my preloader will working just fine
What did i do wrong?
attached is the project file for your perusal.
Your assistance is highly appreciated. Please help
Attached File(s)
preloader_problem.zip ( 298.66k )
Number of downloads: 8
Mar 30 2011, 04:35 PM, updated 15y ago
Quote
0.0147sec
0.67
7 queries
GZIP Disabled