AS3 Question
AS3 Question
Out of context: Reply #2
- Started
- Last post
- 17 Responses
- amullins0
well, assuming that you are - you must define the variable using the var keyword or use this[varname]. also, in your example, you have a syntax error. there should be a dot after the ] to reference the num property of the object. you may be looking for something like:
for (var i:uint = 0; i<numItems; i++) {
this["item" + i].num = i;
}