RE: [Flashcoders] AS3 Defining Objects

2007-01-24 Thread Steven Sacks | BLITZ
You can't strict type items in a hash. You never could, and you don't need to. You cast them as you pull them out of the hash. myObject[i] = {}; myObject[i].prop = Prop Value; var someProp:String = myObject[i].prop; Not to mention, casting as object is considered weak typing since an object

Re: [Flashcoders] AS3 Defining Objects

2007-01-24 Thread slangeberg
eval() hasn't been needed for some time (since bracket[] notation introduced). Just need to remember that you can't type the properties of a plain Object: var numItems:int = 10; var myObject:Object = new Object(); for (var i:int=0; inumItems; i++) {

Re: [Flashcoders] AS3 Defining Objects

2007-01-24 Thread Thomas Fowler
You could make a collection object holding your various objects (1...N) and then have a key for each object. From there you could easily make a method to get a particular item by id out of your collection. - Original Message - From: Eric Lee [EMAIL PROTECTED] To: 'Flashcoders mailing