PDA

View Full Version : Having two different telltargets on one button??



chrono
June 14th, 2003, 10:51 PM
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?

kode
June 15th, 2003, 01:55 AM
welcome, chrono. =)

as stated in the sticky thread Please read before posting (http://www.kirupaforum.com/forums/showthread.php?s=&threadid=7457), specify your version of flash.

thanks. ;)

chrono
June 15th, 2003, 11:04 AM
sorry i didnt see the sticky :sigh: I'll go read it now!

Anyways I have flash mx

kode
June 15th, 2003, 11:49 AM
ok... you could try something like this:

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

chrono
June 15th, 2003, 12:09 PM
Ahh works perfectly now!

Thanks alot for the help! :thumb:

kode
June 15th, 2003, 12:21 PM
no problem. =)