# Control mouse movement with code

**URL:** <https://forum.kirupa.com/t/control-mouse-movement-with-code/15550>\
**Category:** flash\
**Created:** [March 15, 2003, 4:40pm UTC](https://forum.kirupa.com/t/control-mouse-movement-with-code/15550 "2003-03-15T16:40:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yellowjacket](https://avatars.discourse-cdn.com/v4/letter/y/f05b48/32.png) [@yellowjacket](https://forum.kirupa.com/u/yellowjacket)\
**Post date:** [March 15, 2003, 4:40pm UTC](https://forum.kirupa.com/t/control-mouse-movement-with-code/15550/1 "2003-03-15T16:40:25Z")

</div>

Is there a way to control mouse movement with actionscript.

Based upon an event I want to programmatically move the mouse to a specific location.

Thanks,

yj

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 15, 2003, 4:45pm UTC](https://forum.kirupa.com/t/control-mouse-movement-with-code/15550/2 "2003-03-15T16:45:50Z")

</div>

no. you can’t use AS to move the mouse pointer.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 15, 2003, 4:57pm UTC](https://forum.kirupa.com/t/control-mouse-movement-with-code/15550/3 "2003-03-15T16:57:17Z")

</div>

Thanks,

What about issuing a mouseup? Here’s the problem.  
In the game I’m making people click on an object and drag it.  
When their turn expires I want to force them to release the object.

Any suggestions?

YJ

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [March 15, 2003, 7:00pm UTC](https://forum.kirupa.com/t/control-mouse-movement-with-code/15550/4 "2003-03-15T19:00:53Z")

</div>

you’d probably need to use the getTimer() function and then stopDrag()…
