PDA

View Full Version : Visible/Invisible Movie Clips



Orbitals
March 28th, 2008, 04:38 PM
I've been teaching myself Actionscript 2.0 for all of three days, so bear with the n00b here.

I want a movie clip (next) to be visible when the score (dynamic text box called score) is 0, and invisible when it is 1, 2, 3, or 4. (For the record, the score starts out as 4 and decreases.) I've tried things like the following, but nothing works.

score.text = 4;
if(score.text==0){
next=visible
}else{
next!=visible
}

and to tell the truth, I have NO idea what I'm doing. Does anyone know how to do this?
:puzzle:

saion
March 28th, 2008, 05:43 PM
Try:

score.text = "4";
next._visible = (score.text == "0");

This will make next visible when score.text is 0, else it will be invisible.

wiifanatic
March 28th, 2008, 05:45 PM
He wants the exact opposite of what you just said

Try:


score.text = 4;
next._visible = (score.text == 0);

Orbitals
March 28th, 2008, 06:06 PM
Try:

score.text = "4";
next._visible = (score.text == "0");

This will make next visible when score.text is 0, else it will be invisible.

Thanks for the help! Except when I try it, next stays invisible even when the score is 0 and I'm not sure why...