How Do I Stop a Drag if the Mouse Pointer Leaves the Stage?
hi all,
i've got large item on screen can dragged around mouse. i've put invisible button on item with:
on(press) {
this.startdrag();
}
on(release) {
this.stopdrag();
}
but if move mouse pointer outside stage area while dragging item , release mouse button release not detected , drag stays activated , have bring pointer stage , click , release on button again stop drag.
is there way deactivate drag when mouse released outside bounds of stage, perhaps using different method doesn't rely on button?
any appreciated!
just modify ur code bit , u it. have pasted updated source code have on it
on(press) {
this.startdrag();
}
on(release,releaseoutside) {
this.stopdrag();
}
More discussions in ActionScript 1 and 2
adobe
Comments
Post a Comment