----- Original Message ----- From: "sailorsea21" <sailorse...@yahoo.com> To: <flexcoders@yahoogroups.com> Sent: Wednesday, April 15, 2009 1:26 PM Subject: [flexcoders] I need to set a label...???
> Hi everyone, I need to set a label... > > The actual label is in a ArrayCollection. > I can access is like this: > parentApplication.MyLabelArray.getItemAt(0).label001 > or > parentApplication.MyLabelArray.getItemAt(0).label002 > or > parentApplication.MyLabelArray.getItemAt(0).label003 > and so on... > > Is it possible to access the labels dynamically like this: > > var labelNames:Array = new Array("label001", "label002", "label003"); > > for each(var getName:String in labelNames) > { > var radio00:RadioButton = new RadioButton(); > radio00.label = this[parentApplication.MyLabelArray.getItemAt(0).getName; > } > > I can't get this to work... Is there a better way to approach this? How about: parentApplication.MyLabelArray.getItemAt(0)["label003"] Paul > > Thanks everyone! > > -David > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups > Links > > >