PDA

View Full Version : percentage preloader problems


dj fuzzline
08-24-2001, 02:39 AM
I'm having a problem with the loading bar that I'm trying to do. Everything works fine until it reaches 98 or 99 percent but then it freezes and an error comes up saying 'The script in this movie is causing flash to play slowly. Do you want to abort the script? Cancel/Ok'. Is this just my pc (it's quite old and slow) or is there something wrong?

go here to see what I mean >> http://www.dayrell.freeserve.co.uk/chromless/test.html just click on the link (it's very rough so please don't laugh).

DJ Fuzzline.

-- bluesphraks.cjb.net --

Hmmm, it's 3:44 AM, I think I'd better go to sleep, oh how I wish there were lots of naked women here.

[Edited by dj fuzzline on 08-23-2001 at 09:47 PM]

red penguin
08-24-2001, 01:05 PM
What's your coding there?

dj fuzzline
08-24-2001, 02:36 PM
There are four dynamic text boxes: total_bytes, loaded_bytes, remaining_bytes, percent_done, and the loading bar (named bar) which is a movie clip that just fills up if you play it on its own. The frame that is loading is scene 2, frame 1. There are two frames in scene 1, one layer has the text boxes and the loading bar movie clip for two frames and the other layer has the script in:

Frame 1:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay ("Scene 2", 1);
}

Fame 2:
gotoAndPlay (1);

red penguin
08-24-2001, 03:03 PM
ifFrameLoaded is goofy and has been depricated in favor of...

if(_totalframes > 0 && _framesloaded == _totalframes){
gotoAndPlay("begin");
} else {
gotoAndPlay(_currentframe - 1);
}

this would be on the 2nd, yeah? give 'dat a shot, eh!