PDA

View Full Version : % loaded movie


TheZsterBunny
02-04-2003, 11:30 PM
I have a movie clip
I would like to know how to change frames in that clip per 5% loaded (of scene 2)

how would I go about doing this?


-Zster

rynoe
02-04-2003, 11:42 PM
onClipEvent (enterFrame) {
var per = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100);
if (per == 5) {
gotoAndPlay("Scene 1", 5);
} else {
gotoAndStop(1);
}
}

TheZsterBunny
02-04-2003, 11:43 PM
thanks rhino, but where do i put it?

rynoe
02-04-2003, 11:46 PM
That code isn't a solve all unfortunatrly, it was meant to be an example, you would have to taylor it to your movie and the 5 should be a variable so you wouldn't need a long if then else chain