Hi Gagan, Thanks a lot.It worked.
Regards, Shishir. On Mar 18, 6:46 pm, GAGAN anand <[email protected]> wrote: > Hi Shishir > > Try this > > var temp:Object = new Object(); > var arrCol:ArrayCollection = new ArrayCollection(); > var str:String; > > for(var i:int=0;i>20;i++){ > str = String("col"+Number(i+1)); > temp[str] = i+1; > > } > > arrCol.addItem(temp); > trace("Third Property : "+arrCol[0].col3); > > Hope this helps > > Regards > Gagan Deep > > 2009/3/17 Shishir <[email protected]> > > > > > Hi, > > > I want to create objects with dynamic property names and insert it > > into an arrayCollection. > > > For example , just yo illustrate: > > > var mycoll:ArrayCollection; > > var temp:Object = new Object(); > > for(var i:int =0 ; i < 20 ; i++) > > { > > temp.col(i+1) = i+1; > > } > > mycoll.addItem(temp); > > > Basically i want : temp.col1 = 1,temp.col2=2,temp.col3=3 etc.. > > > I would appreciate if someone could guide me on this. > > > Regards, > > Shishir. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

