Duplicate and scale
Code Actionscript 2.0
Frame action
for (i = 1; i < 30; i = i + 1) {
square0.duplicateMovieClip("square" + i, i);
this["square" + i]._xscale = 200 + 60 * i;
this["square" + i]._yscale = 200 + 60 * i;
}
Code Actionscript 3.0
var Squares:Array = new Array(); var i = 1; for (i=1; i<30;i = i + 1) { //important: square has to be exported for actionscript //go to "linkage" in library menu Squares[i] = new squareObject(); Squares[i].x = square0.x; Squares[i].y = square0.y; Squares[i].scaleX=2+0.6*i; Squares[i].scaleY=2+0.6*i; addChild(Squares[i]); }
Description
The instance square0 is duplicated 29 times. Every time square0 is copied, xscale and yscale are enlarged continuously. The scale factor is determined by the loop-variable i.
Download
Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File