On clip event question

Hey all.

Ive got a movie clip with some animation in it, what i would like to happen is that when the timeline reaches the end frame , i would like to play the 2nd frame of the MC or go to the frame label “bottom”

iam using


onClipEvent (enterFrame) {
    _root.sound.gotoAndPlay("bottom");
}

check ou the fla to see what i mean.
thanx

hey soulty :slight_smile:

the variable ok is to prevent the mc from executing the gotoAndPlay() action over and over once the final frame is reached

onClipEvent (enterFrame) {
	if (_level0._currentframe == _level0._totalframes && !ok) {
		this.gotoAndPlay("bottom");
		ok = true;
	}
}

works great, thanx kax. :slight_smile:

Though i dont understand why it wouldnt of worked before, i made another keyframe at the end of the animation and put the code on that so it will only execute that code when it reaches that point? and applied some stop actions to the appropriate places inside the mc, what was it doing wrong?

thanx again
Soulty :smirk:

no problem soulty =)

and … the problem?

the problem was that the mc executed the gotoAndPlay() action over and over again?

oh ok
so it would be going to the label , going to the label without even playing the bottom label tween.
makes complete sence :slight_smile:
thanx dude :smirk:

lol :stuck_out_tongue:

anytime :wink: