Posted By

stiobhart on 06/11/09


show actionscript flash hide alpha movieclip actionscript3 visible college invisible

Versions (?)

actionscript3 - show and hide a movieclip

 / Published in: ActionScript 3

how to show or hide a movieclip, using either the "visible" or "alpha" properties. the movieclip needs to have an instance name. in these examples it is called "stupidmovieclip". quite similar to actionscript, except that we dinnae use underscores with the property names any more. so "_alpha" becomes "alpha" and "_visible" becomes "visible"

  1. // show/hide a movieclip - use either method, but dinnae mix the two
  2. // ie. if you hide a clip using its "_visible" property then show it
  3. // again with its "_visible" not its "_alpha" property [and vice versa]
  5. // show using visible
  6. this.stupidmovieclip.visible = true;
  8. // show using alpha
  9. this.stupidmovieclip.alpha = 100;
  12. // hide using visible
  13. this.stupidmovieclip.visible = false;
  15. // hide using alpha
  16. this.stupidmovieclip.alpha = 0;

Report this snippet  

You need to login to post a comment.