/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
for (var i:uint = 0; i < 20; i++) { var displayObject:MyDisplayObject = new MyDisplayObject(); displayObject.x = displayObject.width * ( i % 5 ); displayObject.y = displayObject.height * Math.floor( i / 5 ); addChild(displayObject); }