Hi Paresh & Paul, both your ideas worked!

Thanks again :)




________________________________
From: Paul Andrews <p...@ipauland.com>
To: flexcoders@yahoogroups.com
Sent: Wednesday, April 15, 2009 10:08:48 AM
Subject: Re: [flexcoders] I need to set a label...???





----- Original Message ----- 
From: "sailorsea21" <sailorsea21@ yahoo.com>
To: <flexcod...@yahoogro ups.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[parentApplicat ion.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/flexcoder sFAQ.txt
> Alternative FAQ location: 
> https://share. acrobat.com/ adc/document. do?docid= 942dbdc8- e469-446f- 
> b4cf-1e62079f684 7
> Search Archives: 
> http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! Groups 
> Links
>
>
>





      

Reply via email to