# Mouse makes pic move

**URL:** https://forum.kirupa.com/t/mouse-makes-pic-move/27558
**Category:** flash
**Created:** [August 4, 2003, 2:13am UTC](https://forum.kirupa.com/t/mouse-makes-pic-move/27558 "2003-08-04T02:13:54Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)
#### Post date: [August 4, 2003, 2:13am UTC](https://forum.kirupa.com/t/mouse-makes-pic-move/27558/1 "2003-08-04T02:13:54Z")

</div>

I am trying to make a flash footer for this forum. A footer is 300 by 60. If the user mouses on the top half of the footer, then my image inside will scroll up. Vice versa for mousing on the bottom half. It aint seem to work. I put the below on the image, which is a movie clip.

```auto

onClipEvent (load) {
	//because the footer is 30 pixels high
	newHeight = this._height+30;
}
onClipEvent (enterFrame) {
	//see if pic is able to scroll up any more
	if (_root._ymouse<30 and this._y>newHeight) {
		//scroll up
		this._y--;
	}
	//see if pic is able to scroll down any more
	if (_root._ymouse>30 and this._y<0) {
		//scroll down
		this._y++;
	}
}

```

---

<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: [August 4, 2003, 2:22am UTC](https://forum.kirupa.com/t/mouse-makes-pic-move/27558/2 "2003-08-04T02:22:08Z")

</div>

**problem solved**. I just changed some 30’s to 15’s

---

<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: [August 4, 2003, 3:04am UTC](https://forum.kirupa.com/t/mouse-makes-pic-move/27558/3 "2003-08-04T03:04:15Z")

</div>

An additional question. When the user mouses off of the whole flash movie, the last \_root.\_ymouse is still retained. How do I null it or set it to some number so my move doesn’t keep on running?

---

<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: [August 4, 2003, 9:21am UTC](https://forum.kirupa.com/t/mouse-makes-pic-move/27558/4 "2003-08-04T09:21:50Z")

</div>

hey mate… id like to mabye to see upload of what you have made… sound pretty cool… and from what u have decribed… it sounds like there is a much easier way to do it… but im probably wrong… =P

-Scotty

---

<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: [August 4, 2003, 10:27am UTC](https://forum.kirupa.com/t/mouse-makes-pic-move/27558/5 "2003-08-04T10:27:03Z")

</div>

hmm, seems to me you could do it much easier by simply using two transparent buttons… the button’s onRollOut should trigger when the mouse is moved outside of the movie, so that should solve your problem… much easier than messing with \_ymouse anyways.
