-
Conditional statement help
I have a button that I want to write a conditional statement that will perform a certain task dependent on what frame label a specific movieclip is on. This is what I want to do written out in basic english.
if movieclip on "blue" then clicking button makes movieclip go to and play or remain on "blue"
if movieclip on "green" then clicking button makes movieclip go to and play or remain on "green"
if movieclip on "red" then clicking button makes movieclip go to and play or remain on "red"
Thanks in advance.
Andy
Last edited by andorosfire; 09-02-2010 at 11:41 AM.
-
Sorry but I don't understand, are there two movie clips?
-
Just one movie clip for the conditional statement.
the button already controls a different clip, and that function unavoidably changes the appearance of the movieclip I want to write the conditional statement for. The conditional statement in theory will correct this problem for me.......I hope.
-
Code:
if (sendMC.currentLabel=="blue") {
recMC.gotoAndStop("blue");
} else if (sendMC.currentLabel=="red") {
recMC.gotoAndStop("red");
} else if (sendMC.currentLabel=="green") {
recMC.gotoAndStop("green");
}
-
VICTORY!!!!!!!!!!!!!!!! AWESOME! thank you so much! Is there a ranking system on this site? if so I's like to give you a billion points.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|