# Forced Mouse Position

**URL:** https://forum.kirupa.com/t/forced-mouse-position/111303
**Category:** Uncategorized
**Created:** [May 25, 2004, 6:16pm UTC](https://forum.kirupa.com/t/forced-mouse-position/111303 "2004-05-25T18:16:40Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Blenderben](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blenderben/32/74_2.png) [@Blenderben](https://forum.kirupa.com/u/Blenderben)
#### Post date: [May 25, 2004, 6:16pm UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/1 "2004-05-25T18:16:40Z")

</div>

I am making a game and a ship I made is suppose to follow your mouse position. After each new level, just as the new stage loads, the ship moves to the position of the mouse, which may be off the screen and force the ship to crash into something. Is there any way i can force the \_xmouse and \_ymouse to stay somewhere? like perse in the middle of the screen or something?

i’ve tried

\_xmouse = 400;  
\_ymouse = 300;

but that obviously doesn’t work.

---

<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: [May 27, 2004, 1:11am UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/2 "2004-05-27T01:11:28Z")

</div>

i still need an answer to my question? anyone out there that knows how to solve my little problem?

---

<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: [May 27, 2004, 1:13am UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/3 "2004-05-27T01:13:31Z")

</div>

I don’t know of any way you can force a mouse position

---

<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: [May 27, 2004, 1:21am UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/4 "2004-05-27T01:21:06Z")

</div>

you could make a new mouse in flash, and then that mouse allways stays in the file, because when your mouse goes off the flash swf, the flash swf mouse cant detect where it is… so it just stays there.

---

<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: [May 27, 2004, 2:09am UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/5 "2004-05-27T02:09:49Z")

</div>

I’d say just have them click a button to go on to the next level, then you will know that it is on the movie.

---

<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: [May 27, 2004, 8:46pm UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/6 "2004-05-27T20:46:33Z")

</div>

> [@Yeldarb](#):
>
> I’d say just have them click a button to go on to the next level, then you will know that it is on the movie.

yes ahahah, thats exactly what i did 😉  
i didn’t want to do it this way, but oh well…still works.

---

<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: [May 27, 2004, 11:58pm UTC](https://forum.kirupa.com/t/forced-mouse-position/111303/7 "2004-05-27T23:58:04Z")

</div>

make mouse-position-dependent script  
easy, like:

```auto
_xmouse>50 || _xmouse>350 ? trace('mouse is off the field') : null;

```
