CarlBanks
01-08-2002, 10:20 AM
Someone please put me out of my misery!
I have tried just about everything I can think of but it just won't work for me. (Flash 5.0)
On _level0 I have global variables which I am using as prerequisites:
B1_0 = "A" ;
B1_1 = 2 ;
B7_0 = "C";
B7_1 = 3;
.....etc.....
I need to access this data from another level dynamically.
variable z is a string (e.g. B1) assigned this value depending on the input from the movie user.
If I write
prereq = _level0.B1_0;
then prereq is given the value "A" (which is what I want).
However, when I try to make this happen dynamically with an expression:
prereq = "_level0."+z+"_0";
or prereq = ["_level0."+z+"_0"];
it doesn't work and gives me the string: "_level0.B1_0"
How do I get the value of the variable instead of getting the string?
I have tried just about everything I can think of but it just won't work for me. (Flash 5.0)
On _level0 I have global variables which I am using as prerequisites:
B1_0 = "A" ;
B1_1 = 2 ;
B7_0 = "C";
B7_1 = 3;
.....etc.....
I need to access this data from another level dynamically.
variable z is a string (e.g. B1) assigned this value depending on the input from the movie user.
If I write
prereq = _level0.B1_0;
then prereq is given the value "A" (which is what I want).
However, when I try to make this happen dynamically with an expression:
prereq = "_level0."+z+"_0";
or prereq = ["_level0."+z+"_0"];
it doesn't work and gives me the string: "_level0.B1_0"
How do I get the value of the variable instead of getting the string?