[RESOLVED] [AS2] Assigning a property name to a variable
Greetings All,
I'm trying to figure out how to assign a property name to a variable, for example :
Let's say I have a box Movie Clip on my stage. I want to set a Boolean, & if that Boolean is true I want to affect the _width of the box, & if it's false I want to affect the _height.
Assuming I can set the property to a variable named MyVar, then I could say:
if (MyBoolean == true) {
MyVar = _width;
}
else {
MyVar = _height;
}
box.MyVar = 400; // Depending on the Boolean value this line will either affect the width or the height of box.
See what I'm getting at? What's the variable type for assigning it a Property Name as a value?
Thanks, FKers :)