# Help with movement on event.... link inside

**URL:** https://forum.kirupa.com/t/help-with-movement-on-event-link-inside/21488
**Category:** Uncategorized
**Created:** [May 22, 2003, 3:18am UTC](https://forum.kirupa.com/t/help-with-movement-on-event-link-inside/21488 "2003-05-22T03:18:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xmattx](https://avatars.discourse-cdn.com/v4/letter/x/6de8d8/32.png) [@xmattx](https://forum.kirupa.com/u/xmattx)
#### Post date: [May 22, 2003, 3:18am UTC](https://forum.kirupa.com/t/help-with-movement-on-event-link-inside/21488/1 "2003-05-22T03:18:01Z")

</div>

ok go here:

[http://www.intrinsicmediainc.com/tbmoc/index.htm](http://www.intrinsicmediainc.com/tbmoc/index.htm)

click on flash and watch the movie.

see the nav. menu? I bet you do…

well the thing of it is, i want the buttons to return to their original position once the users mouse is out of the area where the buttons reside.

I was thinking i could use an if command and check the mouse position, and if the mouse wasnt in a certain box then the x, y position of each button could be told.

heres the action script im using now to move them:  
onClipEvent (load) {  
targetX = \_x;  
// save initial positions  
targetY = \_y;  
speed = 3;  
}  
onClipEvent (enterFrame) {  
if (targetX != \_x || targetY != \_y) {  
// move if not there  
\_x += (targetX-\_x)/speed;  
\_y += (targetY-\_y)/speed;  
}  
}

and then on the menu button to move the others:  
on (rollOver) {  
cb.targetX = -401;  
cb.targetY = 134;  
}

thanks.  
p.s. this is a work in progress so if anyone wants to say anything useful about the design that is more than welcome. thank you again.

---

<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 22, 2003, 3:43am UTC](https://forum.kirupa.com/t/help-with-movement-on-event-link-inside/21488/2 "2003-05-22T03:43:22Z")

</div>

While there are several ways to do this (one of which you mentioned), one is to create an invisible button that covers the entire movie but not your buttons (once they have folded out, and reached their new positions), and trigger the “return” event when they mouseover that button.

---

<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 22, 2003, 3:49am UTC](https://forum.kirupa.com/t/help-with-movement-on-event-link-inside/21488/3 "2003-05-22T03:49:43Z")

</div>

thanks…

That was the first way I thought of actually… as it is very simple to achieve, however then the entire movie is browsed with the mouse in the “button clicked” postion (the little hand) and thats just plain messy and not needed.

thanks though.

anyone else?
