[flexcoders] Re: Can someone help me with this code please?

2008-07-24 Thread ucabb4u
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 :-)




[flexcoders] Re: Can someone help me with this code please?

2008-07-23 Thread valdhor
Rather than asking someone here to write your code for you, it would
be better for you to do some reading/investigation (Perhaps purchase a
book and/or video training), then take a stab at writing it yourself.
If you are still having problems, post the code and someone may
endeavor to help you correct it so it works the way you want.


--- 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





[flexcoders] Re: Can someone help me with this code please?

2008-07-23 Thread Amy
--- 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 :-)