# Preloader Issues (AS3)

**URL:** <https://forum.kirupa.com/t/preloader-issues-as3/302651>\
**Category:** flash\
**Created:** [January 5, 2010, 2:23am UTC](https://forum.kirupa.com/t/preloader-issues-as3/302651 "2010-01-05T02:23:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gamiensrule](https://avatars.discourse-cdn.com/v4/letter/g/e8c25b/32.png) [@gamiensrule](https://forum.kirupa.com/u/gamiensrule)\
**Post date:** [January 5, 2010, 2:23am UTC](https://forum.kirupa.com/t/preloader-issues-as3/302651/1 "2010-01-05T02:23:20Z")

</div>

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 ?
