# Class array

**URL:** <https://forum.kirupa.com/t/class-array/321024>\
**Category:** Uncategorized\
**Created:** [April 8, 2011, 5:22am UTC](https://forum.kirupa.com/t/class-array/321024 "2011-04-08T05:22:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radi](https://avatars.discourse-cdn.com/v4/letter/r/4491bb/32.png) [@radi](https://forum.kirupa.com/u/radi)\
**Post date:** [April 8, 2011, 5:22am UTC](https://forum.kirupa.com/t/class-array/321024/1 "2011-04-08T05:22:29Z")

</div>

how can i reference a public class array from outside that class i get reference errors with everything that i’ve tried  
this is in the class (omitting the useless code)

```auto

public var Slots:Array = new Array()
var slot1:MovieClip = new MovieClip();
Slots[num] = slot1    

```

(num is 1-30 from the loop that this code is in)  
and on the codes that i have tried that exists outside of the class (that doesn’t work)

```auto

 CLASS.getArray(Slots[num]).visible = false
CLASS.Slots[num].visible = false

```
