Setting visibility?

I want to set the visibility of a movie clip (containerMC) can anyone suggest how I can toggle visibility on clicking a button?

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

Spot on, exactly what I needed