PDA

View Full Version : if/ else statements



pixifish
January 18th, 2002, 10:23 AM
I require one action to be definately executed on one target movieclip.

Then I need to check 5 other movieclips to see if they are on a certain frame, and if so then to instruct them to play.

I understand that I need to use if / else statements and _currentframe property for the second part...but I can't get both parts of the code to execute. Only one or the other...Is there and and statement or something of the like....

ilyaslamasse
January 18th, 2002, 11:24 AM
Yes, you can use that, doing so :
if ((movie1._currentframe == 20) and (movie2._currrentframe ==20) and ....) {
play () ;
}

You can also set a variable "i" to 0 in your main timeline. When your first MC gets to the frame you want, do _root.i += 1 ;

Then you can test if (_root.i ==5) {play();}

Should work.

pom

upuaut8
January 19th, 2002, 12:37 AM
though if you are working in Flash 5.0 you should use the "&&" instead of "and".

gingerhippy69
January 19th, 2002, 04:58 AM
pub40.ezboard.com/fkirupa...6.topic... (http://pub40.ezboard.com/fkirupafrm8.showMessage?topicID=2136.topic...)

kinda simular to what yuo want ... i think....

ZH...