Question

is it possible for flash to detect off-stage mouse coordinates in order to continuously drag an object within its bounds while the mouse is moving outside of the stage?

for example: i have a draggable red square on my stage. the stage is the bounds of the drag. if i drag the red square to the bottom of the stage and continue to drag outside of and around the stage, i'd like the red square to continue moving within it's bounds, following the mouse coordinates.

currently, dragging halts as soon as i leave the stage and the red square only begins to move with the mouse coordinates if i reenter the stage bounds.

Was it helpful?

Solution

Flash won't get mouse events when the mouse is out side its stage area; so I'm afraid you can't do this.

OTHER TIPS

If the flash piece is inside a web browser, you "could" try and use javascript to gather the x and y position for Mouse and then feed it back to Flash using ExternalInterface. A word of caution though, this could turn out to be very hard to integrate into all browsers and there is a lot of room for errors. This shouldn't stop you from trying though.

See util program PageFlip of iparigrafika.hu

When you drag the corner of page, the mouse moved out side of stage is right. Get the source program V2.2 at same address.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top