Changing the properties of an object

I am trying to learn Flex, which uses actionscript 3.  Apparently Actionscript 3 does not allow the use of the eval() function.
what i have is an array of strings
private static var gridA:Array = ["b1","b2","b3","b4","b5","b6","b7","b8","b9"];
this is in a file called
in myApp.mxml i have 9 text inputs with the IDs that correspond to the text in the array(gridA)

when a button is clicked in myApp.mxml it calls a function in
one of the arguments to the function is the this scope

so what i am trying to do in is as follows
take the psuedo function that would be in

 public function a(objGlobal:Object):void{
  var randNum:int = 1+(Math.random()*9);
  //should evaluate to objGlobal.b1.visible=false; but it doesnt cant use eval

i cannot use eval() so how can i change the property of a random text input?

Who is Participating?
Siva Prasanna KumarConnect With a Mentor Principal Solutions ArchitectCommented:
See these

I think this may work for you

objGlobal[ gridA[randNum] ].visible = false;
jduawaAuthor Commented:
thought i tried that...guess not
All Courses

From novice to tech pro — start learning today.