all groups > flash actionscript > march 2004 >
You're in the

flash actionscript

group:

Read Dynamic Variable



Read Dynamic Variable Vayapues
3/1/2004 8:04:24 PM
flash actionscript: How can I set a variable to the value of another variable, which I need to
reference dynamically.
Essentially, I need to set var to the value of a second variable. The name of
the second variable will change depending on other factors,

I tried the following, but they don't work:

var="string"+var2+"string"; // in this case, flash sets the value of var to
"string(value of var2)string", instead of to the actual value of the variable
named "string(value of var2)string".

var = this["string"+var2+"string"]; didn't seem to work either.

Help is greatly appreciated.

Thanks,
Hiram


Re: Read Dynamic Variable Vayapues
3/1/2004 8:41:33 PM
whops, I just realized my mistake.

should have been as follows:

AddThis Social Bookmark Button