Skip to main content
April 19, 2006
Question

Use variable in target path

  • April 19, 2006
  • 2 replies
  • 199 views
Hi

Im sure this is no sweat for a lot of you guys but as im new to using arrays and stuff its still escapung me.

I nees to use a variable as part of a target path inside a for loop so it populates a series of dynamic text boxes with instance names busName0, busName1 etc. can this be done?

Heres my code so far:

stop();

var busNameArray:Array = new Array(
"business 01",
"business 02",
"business 03",
"business 04",
"business 05",
"business 06",
"business 07",
"business 08",
"business 09",
"business 10"
);
var i:Number;
for (i = 0; i < busNameArray.length; i++) {
this.rightPanel.busName(need the variable i to go here).text = this.busNameArray ;
}

Any help much appreciated.
cheers chris
This topic has been closed for replies.

2 replies

April 19, 2006
Hey thanks for that, works a treat.

Cheers
Inspiring
April 19, 2006
I know
You're welcome.
Inspiring
April 19, 2006
See attached.