# FMX: Array of classes or objects?

**URL:** <https://forum.kirupa.com/t/fmx-array-of-classes-or-objects/86868>\
**Category:** flash\
**Created:** [April 16, 2005, 8:00am UTC](https://forum.kirupa.com/t/fmx-array-of-classes-or-objects/86868 "2005-04-16T08:00:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenner](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@Jenner](https://forum.kirupa.com/u/Jenner)\
**Post date:** [April 16, 2005, 8:00am UTC](https://forum.kirupa.com/t/fmx-array-of-classes-or-objects/86868/1 "2005-04-16T08:00:01Z")

</div>

I’m trying to create an array of a particular class inside another  
class. I believe my problems at this point are the array/class  
declarations. The code below represents an example of what I’m  
attempting, and not the actual application.

class c\_one {  
var a:Number;  
var b:Number;  
var c:Number;  
}

class c\_two {  
var str1:String;  
var str2:String;

var cOne\_Array:c\_one = Array(); \<-----------???

function c\_two () {  
str1 = “Hello”;  
str2 = “there”;

cOne\_Array = new Array();  
}  
//End of class  
}

I believe the tutorial also mentioned that the constructor needs  
the “new Array” to make sure that each instance has a new copy  
of an array. However, the compiler doesn’t like this line.

I can comment out the constructor Array statement. However my  
application code doesn’t seem to recognize that an array exists if  
I attempt to do the following:

var my\_class2:c\_two

my\_class2.cOne\_Array[1].b = 555; \<----- undefined, according to Flash

Any help is appreciated.
