PDA

View Full Version : Setting visibility?



Furious5
December 15th, 2002, 10:59 AM
I want to set the visibility of a movie clip (containerMC) can anyone suggest how I can toggle visibility on clicking a button?

alethos
December 15th, 2002, 11:09 AM
You can use the _visible property of the movie clip.



on(release){
if(containerMC._visible == true){
containerMC._visible = false;
} else {
containerMC._visible = true;
}
}


OR, you can cut that down to the following if you want to use the "?:" conditional statement:



on(release){
containerMC._visible = containerMC._visible ? false : true;
}


Hope that helps.

-Al

Furious5
December 15th, 2002, 11:37 AM
Spot on, exactly what I needed