PDA

View Full Version : Please help! having trouble with movie loading screens


Edgemaster
06-28-2002, 06:54 PM
Hello all,

I'm new to flash stuff, and im trying to write a small piece of code that will hold the movie on the first frame until all the frames are loaded, and when all the frames are loaded it will advance to the second frame and play the movie.

I tried, and i think im quite close...please point me in the right direction:

Code attached to frame 1:

stop();

Code attached to movie clip on frame 1:

onClipEvent (enterFrame) {
if (Get_framesloaded==Get_totalframes) {
_root.gotoAndPlay(2);
}
}


Well, there it is. At the moment all it does is skip straight to frame 2 before the frames have all loaded...resulting in a very jerky movie :(

Please help me! :)

Abelius
06-28-2002, 11:08 PM
Put this on frame 1:


if (_root.getBytesLoaded() == _root.getBytesTotal()) {
gotoAndPlay("EndofLoadingPhase");
}


Then, on frame 2 send it back to frame 1, so it reads the whole spiel again...

...assuming that "EndofLoadingPhase" is the name of the frame where the movie continues, with all the frames loaded...

Billy T
06-29-2002, 01:19 AM
actually a combination of the 2 would probably be the ideal solution...

Code attached to frame 1:

stop();

Code attached to movie clip on frame 1:

onClipEvent (enterFrame) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
_root.gotoAndPlay(2);
}
}

cheers

Abelius
06-29-2002, 02:13 AM
Darn... that's even smarter, man! Well, Edgemaster's got his answers... :)

Edgemaster
06-29-2002, 06:56 AM
Thanx alot :) i wasnt all that far off then....woohoo! :P Thanx again