--- In flexcoders@yahoogroups.com, "ucabb4u" <[EMAIL PROTECTED]> 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 :-)