starling framework - Actionscript 3 Injecting string to an existing variable/constant -
Very simple question is that I can not find the answer:
private call LEFT_HOUSE_2_X : Number = 445; Private Connection LEFT_HOUSE_2_Y: Number = 145; Private connection LEFT_HOUSE_2_WIDTH: number = 45; Private Connection LEFT_HOUSE_2_HEIGHT: Number = 35; If I am using an Iterator, then how can I use the above continuously: eg.
var i: uint = 2; LEFT_HOUSE_ {i} _X? It has to be done with a variable too.
Using the square bracket You can read a const or variable with the variable name
this ["LEFT_HOUSE_" + I + "_X"]
Comments
Post a Comment