How to stop a preloader stalling a flash movie in IE
Posted
by rogersoli
on Stack Overflow
See other posts from Stack Overflow
or by rogersoli
Published on 2010-04-23T15:30:11Z
Indexed on
2010/04/23
15:33 UTC
Read the original article
Hit count: 181
actionscript-3
This is only a problem in IE.
the following actionscript is for a simple preloader for a movie i'm working on. It works fine in Firefox but the movie stops on the first frame when opened with Internet Explorer. Has anyone had this problem before?
stop();
addEventListener(Event.ENTER_FRAME,checkLoad);
function checkLoad(e:Event):void {
var pcent:Number=this.loaderInfo.bytesLoaded /this.loaderInfo.bytesTotal*100;
bar_mc.scaleX=pcent/100;
loader_txt.text=int(pcent)+"%";
if (pcent==100) {
removeEventListener(Event.ENTER_FRAME,checkLoad);
this.gotoAndPlay(2);
}
}
© Stack Overflow or respective owner