# Im trying to make a class file

**URL:** https://forum.kirupa.com/t/im-trying-to-make-a-class-file/84565
**Category:** Uncategorized
**Created:** [March 28, 2005, 8:54pm UTC](https://forum.kirupa.com/t/im-trying-to-make-a-class-file/84565 "2005-03-28T20:54:19Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![glkngs](https://avatars.discourse-cdn.com/v4/letter/g/4491bb/32.png) [@glkngs](https://forum.kirupa.com/u/glkngs)
#### Post date: [March 28, 2005, 8:54pm UTC](https://forum.kirupa.com/t/im-trying-to-make-a-class-file/84565/1 "2005-03-28T20:54:19Z")

</div>

Hi all!  
Im trying to make a class that loads in some external data, and then creates some arrays in the class, which names and content are based on the data that are loaded.  
What i have now, is something like like this:

```auto

class DataConn
{
(...)
   xmlOutput.onLoad = function()
   {
      var tables:Array = this.firstChild.childNodes;
      for(var i:Number=0;i<tabels.length;i++)
      {
         //how do i now create arrays in the root of the class?
         classRoot(?)[tables*] = new Array()
      }
   }
(...)
]

```

I guess my problem is, that i dont know how the reference the “root” of the class.  
What i want to be able to do with this class is this:

```auto

dcTest:DataConn = new DataConn();
trace(dcTest.theHopefullyCreatedArray[6])

```

Any help help on how to do this would be great :hangover:  
Thanks…
