PDA

View Full Version : Need help with pre-loader



eddy_i
September 24th, 2004, 05:22 PM
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:

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);
}
}

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.

I need the loading text to come up immediately, so the user will know what is going on.

Does anyone know why I am geting this delay or how to overcome it?

ANy help would be appreciated. You can e-mail me direct if u like at

edward@allwaymedia.com

Thanks
Eddy

3pinter
September 25th, 2004, 07:41 AM
hmmzz

Do you load this movie externaly? I asume you don't (according to my point of view of your text.) But that's what I would do.

Anyway; do you have a 'light' version of your fla? (without the 200meg file) ;-)