show/hide items


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ///////////// hideItem / showItem
  2. function hideItem(items:Array):void
  3. {
  4. for(var i=0; i<items.length; i++)
  5. {
  6. items[i].visible = false;
  7. }
  8. }
  9.  
  10. function showItem(items:Array):void
  11. {
  12. for(var i=0; i<items.length; i++)
  13. {
  14. items[i].visible = true;
  15. }
  16. }
  17.  
  18. ///////////////////////////////////////////////
  19. showItem([mc1,mc2,mc3]);
  20. hideItem([mc1,mc2,mc3]);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.