NEU: Alle Visual Codes als Code Snippets für Flash CS5:
jetzt hier downloaden .

Duplizieren, kombiniert 1

Code Actionscript 2.0

Frame-Aktion

for (i = 1; i < 100; i = i + 1) {
square0.duplicateMovieClip("square" + i, i);
this["square" + i]._rotation = 5.9 * i;
this["square" + i]._xscale = 5 * i;
this["square" + i]._yscale = 5 * i;
this["square" + i]._alpha = 100 - i;
}
square0._visible = 0;

Code Actionscript 3.0

var Squares:Array = new Array(); var i = 1; for (i=1; i<100;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].rotation = 5.9 * i; Squares[i].scaleX = 0.05 * i; Squares[i].scaleY = 0.05 * i; Squares[i].alpha = 1 - i/100; addChild(Squares[i]); } square0.visible = 0;

Infos

Das Quadrat square0 wird 99 mal kopiert. Beim Kopieren werden die Eigenschaften Rotation, Skalierung xscale, yscale sowie Deckkraft alpha kontinuierlich verändert. Die jeweilige Veränderung wird aus der Schleifenvariablen i berechnet.

Download

Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File


Share