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

geschütteltes Raster

Code Actionscript 2.0

Frame-Aktion

i = 1;
for (gx = 0; gx <= 8; gx = gx + 1) {
for (gy = 0; gy <= 8; gy = gy + 1) {
i = i + 1;
square0.duplicateMovieClip("square" + i, i);
this["square" + i]._x = gx * 50;
this["square" + i]._y = gy * 50;
this["square" + i]._xscale = 100 + random(50);
this["square" + i]._yscale = 100 + random(50);
}
}
square0._visible = 0;

Code Actionscript 3.0

var Squares:Array = new Array(); var i = 1; for (var gx = 0; gx < 8; gx = gx + 1) { for (var gy = 0; gy < 8; gy = gy + 1) { i = i+1; //important: square has to be exported for actionscript //go to "linkage" in library menu Squares[i] = new squareObject(); Squares[i].alpha = square0.alpha; Squares[i].x = gx * 50; Squares[i].y = gy * 50; Squares[i].scaleX = 1 + Math.random()*0.5; Squares[i].scaleY = 1 + Math.random()*0.5; addChild(Squares[i]); } } square0.visible = false;

Infos

Ein halbtransparentes Grundelement wird auf einem 8x8 Raster angeordnet. Mit der Zufallsfunktion 100 + random(50) erhält jede Instanz einen unterschiedlichen Wert für Breite _xscale und Höhe _yscale.

verwandt mit: Raster Anordnung

Download

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


Share