I created a simple transparent app for Adobe AIR in Flash. It has not chrome, so now I need to make it draggable. How could this be done? Thanks!
+1
A:
This code is for the whole window draggable:
stage.addEventListener( MouseEvent.MOUSE_DOWN, startMove );
private function startMove( event : MouseEvent ) : void {
stage.nativeWindow.startMove();
}
Other case, if you need just one little part of a window to accept MOUSE_DOWN event to start dragging, replace stage.addEventListener with movieClip.addEventListener and you are done.
Sergey Z.
2010-02-20 11:04:31
I got this error: 1013: The private attribute may be used only on class property definitions.
Martti Laine
2010-02-20 14:27:13
Oh damn it, my mistake. This works perfectly, thanks! :)
Martti Laine
2010-02-20 14:28:27