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

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support