Having two different telltargets on one button?

Hi everyone.

Before I start, let me say that I tried searching for this, and I didnt come up with any results that helped me.

Ok.

I currently have a button that plays a movie clip when clicked. the code looks like this:


on (release) {
    tellTarget ("lava") {
        gotoAndPlay(2);
    }
}

simple enough.

Now, when the user clicks on this same button again (while the movie clip is currently playing) I want the movieclip to switch to a different one.

How might I go about doing this?

welcome, chrono. =)

as stated in the sticky thread Please read before posting, specify your version of flash.

thanks. :wink:

sorry i didnt see the sticky :sigh: I’ll go read it now!

Anyways I have flash mx

ok… you could try something like this:

on (release) {
if (lava._currentframe != 1) theOtherMovieClip.gotoAndPlay(2);
else lava.gotoAndPlay(2);
}

:wink:

Ahh works perfectly now!

Thanks alot for the help! :thumb:

no problem. =)