Thank you very much for this suggestion.  I can see it is a much better 
approach than all 
the others I have tried and failed with.  Exactly the kind of answer I hoped to 
elicit by 
phrasing the question in this way.  I will study this technique for my homework 
:)

Thanks Amy, I truly appreciate your help.

Andy

--- In flexcoders@yahoogroups.com, "Amy" <[EMAIL PROTECTED]> wrote:
>
> --- In flexcoders@yahoogroups.com, "ucabb4u" <arc@> wrote:
> >
> > Can someone help me with the code required to do the action 
> described in the comment 
> > block please?
> > 
> >     <Script>
> >     import mx.collections.ArrayCollection;
> > 
> >     
> >     [Bindable]
> >     public var tempArray:ArrayCollection = new ArrayCollection();
> > 
> >     private function showSelection(event:Event):void{        
>       
> >     trace(slct.selectedIndex);
> > 
> >      /*  Use the selectedIndex create an array name 
> e.g. "data1", "data2", "data3", etc.
> >          Replace the contents of the tempArray collection with 
> the contents of the array 
> > collection selected - "data1", "data2", "data3", etc.           
> >        
> >      */  
> >     }
> >     </Script>
> >
> 
> It seems to be that you'd be better off with an array containing your 
> ArrayCollections and then just pull out the one by index.  However, 
> this['myVarName'] will allow you to dynamically reference the 
> variable.  Good luck with your homework :-)
>

Reply via email to