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

Drag

Code Actionscript 2.0

Instanz-Aktion

on (press) {
this.startDrag(false);
}
on (release) {
this.stopDrag();
}

Code Actionscript 3.0

square.addEventListener(MouseEvent.MOUSE_DOWN, press); square.addEventListener(MouseEvent.MOUSE_UP, release); function press(e:MouseEvent) { e.target.startDrag(false); } function release(e:MouseEvent) { e.target.stopDrag(); }

Infos

Dieses Skript bewirkt, dass das Quadrat von der Maus mitgezogen wird.

verwandt mit: Maus Position

Download

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


Share