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
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