Hi,
There isn’t any error displaying. I traced the “rectAry[1]” and it’s “undefined”
When I change the variable “i” inside the statement to 3 or other values,
the instance will be displayed probably.
package
{
import flash.display.Sprite;
public class testClass extends Sprite
{
private var rectAry:Array = new Array();
public function testClass():void
{
...
for (var i:Number; i<5; i++)
{
rectAry* = new rectangles();
addChild(rectAry*);
rectAry*.x = 30;
}
trace(rectAry[1]);
}
}
}
I’m new to actionscript, Thanks for help!