# Need help with pre-loader

**URL:** <https://forum.kirupa.com/t/need-help-with-pre-loader/123843>\
**Category:** Uncategorized\
**Created:** [September 27, 2004, 11:36pm UTC](https://forum.kirupa.com/t/need-help-with-pre-loader/123843 "2004-09-27T23:36:21Z")\
**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 27, 2004, 11:36pm UTC](https://forum.kirupa.com/t/need-help-with-pre-loader/123843/1 "2004-09-27T23:36:21Z")

</div>

I am creating an interactive CD ROM that has a flash file with a 200 meg video file in it. I want to run a pre-loader that will indicate “loading…”  
and indicate the file is loading. I have a stop action script built into my first keyframe 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]When I go from scene 1 to scene 2 and 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. I know this is a big file to load into memory from a CD, but would like the “Loading…” to display immeidately[/font][font=Arial], so the user will know what is going on.[/font]

[font=Arial]Does anyone know why I am geting this delay or how to overcome it? Again, this is not an internal job or running from a web server. It is loading on a local client from a CD ROM drive.[/font]

[font=Arial]Any help would be appreciated. You can e-mail me direct if u like at[/font]

[font=Arial][edward@allwaymedia.com](mailto:edward@allwaymedia.com)[/font]

[font=Arial]Thanks[/font]  
[font=Arial]Eddy[/font]
