/ Published in: ActionScript 3

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var mc:MovieClip = new MovieClip(); // make new object // these strings can come from flashvars, arrays etc var n:String = "tallness"; // this is the property var v:String = "100 miles"; // this is the value for the property // assign the property and value at the same time mc[n] = v; trace(mc.tallness); // traces: 100 miles
Comments
