Here’s the AS …
stop();
this.addEventListener(Event.ENTER_FRAME, loading);
function loading(e:Event):void{
var total:Number = this.stage.loaderInfo.bytesTotal;
var loaded:Number = this.stage.loaderInfo.bytesLoaded;
loader_txt.text = "Loading - "+Math.floor((loaded/total)*100)+ “%”;
if (total == loaded){
play();
this.removeEventListener(Event.ENTER_FRAME, loading);
}
}
problem is, the movie doesn’t “stream” like it’s supposed to, so what happens is the browser waits until it’s loaded, then starts playback. I get a blank screen while it’s loading, then a split second look at my preloader showing 100%, and then the movie starts. I don’t get it. I’ve done this a thousand times in AS2, but this is my first one in AS3. What am I doing wrong ?