View Full Version : how do I write an if statment?
richyrich3000
10-20-2005, 07:21 PM
i have a button that I want to control a movie clip
there are two frame label on the clip open and close
i want the button to check if the clip is open or close and go to the other label.
any help is appreciated
=)
Flash Gordon
10-20-2005, 08:29 PM
if (this statement is true) {
do this stuff here ;
} else {
do this stuff here;
}
in you case set up a boolean value to determine if it is open or not
var myToggle:Boolean = true;
if (myToggle) {
do this;
myToggle = false;
} else {
do this
myToggle = true;
}
oldnewbie
10-20-2005, 09:34 PM
on(release){
if(closed = !closed){ // closed is here a variable...
_level0.your_mc.gotoAndStop("close");
}else{
_level0.your_mc.gotoAndStop("open");
}
}
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.