# Problem with preloader

**URL:** <https://forum.kirupa.com/t/problem-with-preloader/244650>\
**Category:** Uncategorized\
**Created:** [November 20, 2007, 4:44pm UTC](https://forum.kirupa.com/t/problem-with-preloader/244650 "2007-11-20T16:44:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![always\_one\_up](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@always\_one\_up](https://forum.kirupa.com/u/always_one_up)\
**Post date:** [November 20, 2007, 4:44pm UTC](https://forum.kirupa.com/t/problem-with-preloader/244650/1 "2007-11-20T16:44:56Z")

</div>

hello everyone. I have a problem with a preloader (yes, I’ve tried to use “search”). it’s in separate file (not same as file that contains website) and it loads website using loadMovie. what I want is the following: in the 1st frame it downloads all the website data, after it’s completed it plays frame 10 up to frame 60 and when it reaches it it starts the website. maybe someone could fix my AS code as I have some serious problems with it…

in the 1st frame there is:

```auto
var presentation:MovieClip = this.createEmptyMovieCli p("presentation", this.getNextHighestDepth ()); 
presentation.loadMovie(" test.swf"); 
this.onEnterFrame = function():Void { 
var loadedData:Number = this.presentation.getByt esLoaded(); 
var allData:Number = this.presentation.getByt esTotal(); 
var percent:Number = Math.round(loadedData/al lData*100); 
tlo_Glow._alpha = (20 + percent); 
rectMask_mc._y = 680 - (percent * 0.85); 
if (loadedData >= allData) { 
gotoAndPlay(10); 
delete this.onEnterFrame; 
this.presentation._visib le = false; 
} 
}; 

```

and in the last frame:

```auto
this.presentation._visib le = true; 
stop();

```

any help would be really appreciated!
