# Visibility Class

**URL:** https://forum.kirupa.com/t/visibility-class/271927
**Category:** flash
**Created:** [September 30, 2008, 2:06pm UTC](https://forum.kirupa.com/t/visibility-class/271927 "2008-09-30T14:06:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![as3\_novice](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@as3\_novice](https://forum.kirupa.com/u/as3_novice)
#### Post date: [September 30, 2008, 2:06pm UTC](https://forum.kirupa.com/t/visibility-class/271927/1 "2008-09-30T14:06:37Z")

</div>

I am trying to create a class that will set the visibility of all movieClips to false by default. I would like to call a function like showClip(box\_mc, triangle\_mc) and change the visibility of just these movieClips to true. I have started creating my “Cloak class” but definitely need some guidance. The errors vary based on several attempts I’ve made but here is what I have thus far.

```auto
 
package 
{ 
import flash.display.MovieClip; 
public class Cloak extends MovieClip
{ 
public function Cloak() 
 { 
 box.visible = false;
    
 } 
 
 public function showClip(clipName:String):void
      {
        var c = clipName;
        c.visible = true;
      }
} 
}

```
