Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: [flasher] array name as a variable
From: Muzak
Date: Tue, 13 Feb 2001 02:36:43 -0000

Not 100% sure what you're asking but if you want to define the array through a variable, then I think this is what you need:

Fish = new Array("somevalue", "otherValue", "aVar", "anotherVar");
X = "3";
itemArray = "Fish";
itemValue = _root[itemArray][X];
trace (itemValue);

hth,
Muzak

----- Original Message -----
From: "Virgil Carroll" <vcarrollatistreaminteractive [dot] com>
To: "flasher from chinwag" <flasheratlists [dot] chinwag [dot] com>
Sent: Tuesday, February 13, 2001 12:44 AM
Subject: [flasher] array name as a variable


> Group,
>
> Is there a way to have an array name set as a variable. Say for instance
> that I want to set-up an array.
>
> Fish = new Array (12);
>
> Now I have other arrays that I may need information from as well. Based
> upon the users input I need to pull the information from the correct array.
> So if I use the formula:
>
> X=10
> Item_array = Fish
>
> Item_value = Item_array (x); It does not work.
>
> Any ideas if this is possible. I have not been able to get it to work. Any
> help is greatly appreciated.
>
> Tx,
> Virgil Carroll





[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]