Try
public var myArray:Array = new Array();
myArray[0] = new xClass();
myArray[1] = new yClass();
myArray[2] = new zClass();
From:
flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Libby
Sent: Wednesday, January 04, 2006
8:28 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Need Help
with Complex Array Syntax
I am trying to create an array of Objects and each
is a different
class. Is it possible to create the array
while telling the class
type of each object? On a plain old single Object
instantiation you
might do this:
public var x:xClass;
x = new xClass();
I am trying to create an array of these objects
(below), but Flex
doesn't like my ":" syntax in the array
definition. What am I doing wrong?
public var myArray:Array = new
Array(x:xClass,y:yClass,z:zClass);
myArray[0] = new xClass();
Thanks for your help,
Libby
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Need Help with Complex Array Syntax Jose \(DSM\) Lora
-