# Preload the same movie as in AS2

**URL:** <https://forum.kirupa.com/t/preload-the-same-movie-as-in-as2/280672>\
**Category:** flash\
**Created:** [January 30, 2009, 6:59am UTC](https://forum.kirupa.com/t/preload-the-same-movie-as-in-as2/280672 "2009-01-30T06:59:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kookaburra](https://avatars.discourse-cdn.com/v4/letter/k/f475e1/32.png) [@kookaburra](https://forum.kirupa.com/u/kookaburra)\
**Post date:** [January 30, 2009, 6:59am UTC](https://forum.kirupa.com/t/preload-the-same-movie-as-in-as2/280672/1 "2009-01-30T06:59:47Z")

</div>

I’m working on test.fla, with document class test.as.

I write the following code to test.as

[AS]  
package {  
import flash.display.MovieClip;  
import flash.events.\*;  
import flash.utils.getTimer;  
//Other Main Timeline imports go here! Don’t forget!  
public class test extends MovieClip {  
public function test() {  
this.loaderInfo.addEventListener(Event.INIT, initLoading);  
this.loaderInfo.addEventListener(Event.COMPLETE, initApplication);  
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, showProgress);  
}  
public function initLoading(e:Event){  
trace(Event.INIT+getTimer());  
}

```
    public function showProgress(theProgress:ProgressEvent):void {
        var percent:Number = Math.round((theProgress.bytesLoaded / theProgress.bytesTotal )*100 );
        trace(percent + " %");
        this.graphics.clear();
        this.graphics.lineStyle(1, 0x000000, 1);
        this.graphics.beginFill(0x000000);
        this.graphics.drawRect(100,100,percent,10);
    }
    public function initApplication(myEvent:Event):void {
        trace("Loaded !"+flash.utils.getTimer());
    }
}

```

}[/AS]

The output is as follows:

init339  
100 %  
Loaded !341

Now my problem is the INIT event is fired at 339 milliseconds.  
I need to show a preloader for the first 339 milliseconds.

Can someone help me?
