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

Lineare Bewegung

Code Actionscript 2.0

Instanz-Aktion

onClipEvent (enterFrame) {
this._x = this._x + 2;
this._y = this._y + 1;
}

Code Actionscript 3.0

addEventListener(Event.ENTER_FRAME, enterFrame); function enterFrame(event:Event) { square.x = square.x + 2; square.y = square.y + 1; }

Infos

Dieses Skript erhöht schrittweise die x- und y-Koordinate des Objekts. Dadurch bewegt sich das Objekt linear in eine definierte Richtung.

Download

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


Share