Copy link to clipboard
Copied
Please let me know if this can be done (or if I am insane for asking), but say I have a starting point on the root stage of x is 500 and y is 250. I want a player to navigate his cursor through a maze (an MC) with out touching the walls. If the walls of maze_mc are touched because of a onRollOver function, can I send the mouse back to _x=500, _y=250?
Thanks
You cannot force the mouse/cursor position to be anywhere with code, only using the mouse can do this.
Instead of navigating the cursor, navigate a movieclip that behaves like a cursor until your conditions dictate otherwise. Let the user rollover that object and have it latch on, hiding the true cursor at that point. When the object hits a wall, release it from following the mouse and send it back to the starting position.
Copy link to clipboard
Copied
You definitely cannot do this in regular Flash and I am all but certain that this isn't even possible in Adobe AIR without a native extension.
Copy link to clipboard
Copied
You cannot force the mouse/cursor position to be anywhere with code, only using the mouse can do this.
Instead of navigating the cursor, navigate a movieclip that behaves like a cursor until your conditions dictate otherwise. Let the user rollover that object and have it latch on, hiding the true cursor at that point. When the object hits a wall, release it from following the mouse and send it back to the starting position.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now