# Need help with pre-loader

**URL:** <https://forum.kirupa.com/t/need-help-with-pre-loader/123574>\
**Category:** Uncategorized\
**Created:** [September 24, 2004, 9:22pm UTC](https://forum.kirupa.com/t/need-help-with-pre-loader/123574 "2004-09-24T21:22:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddy\_i](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@eddy\_i](https://forum.kirupa.com/u/eddy_i)\
**Post date:** [September 24, 2004, 9:22pm UTC](https://forum.kirupa.com/t/need-help-with-pre-loader/123574/1 "2004-09-24T21:22:39Z")

</div>

I have a flash file with a 200 meg video file in it. I want to run a pre-loader and indicate the file is loading. I have a stop action script built into my first keyframs and on a seperate layer the following action script:

[font=Arial][size=2]onClipEvent (load) {  
total = \_root.getBytesTotal();  
}  
onClipEvent (enterFrame) {  
loaded = \_root.getBytesLoaded();  
percent = int(loaded/total\*100);  
text = “loading… “+percent+”%”;  
gotoAndStop(percent);  
if (loaded == total) {  
\_root.gotoAndPlay(2);  
}  
}[/size][/font]  
[font=Arial][/font]  
[font=Arial]When I click to load the movie, there is a 4 - 5 second delay before I get my Loading text. The file then loads rather quickly and the video file plays. [/font]  
[font=Arial][/font]  
[font=Arial]I need the loading text to come up immediately, so the user will know what is going on.[/font]  
[font=Arial][/font]  
[font=Arial]Does anyone know why I am geting this delay or how to overcome it?[/font]  
[font=Arial][/font]  
[font=Arial]ANy help would be appreciated. You can e-mail me direct if u like at[/font]  
[font=Arial][/font]  
[font=Arial][edward@allwaymedia.com](mailto:edward@allwaymedia.com)[/font]  
[font=Arial][/font]  
[font=Arial]Thanks[/font]  
[font=Arial]Eddy[/font]
