# Scrollling menu

**URL:** <https://forum.kirupa.com/t/scrollling-menu/166758>\
**Category:** Uncategorized\
**Created:** [October 22, 2005, 4:31pm UTC](https://forum.kirupa.com/t/scrollling-menu/166758 "2005-10-22T16:31:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![g5604](https://avatars.discourse-cdn.com/v4/letter/g/54ee81/32.png) [@g5604](https://forum.kirupa.com/u/g5604)\
**Post date:** [October 22, 2005, 4:31pm UTC](https://forum.kirupa.com/t/scrollling-menu/166758/1 "2005-10-22T16:31:43Z")

</div>

Hi,

i am using this prototype as part of my xml menu. heres the ease code:

MovieClip.prototype.easeY = function(t) {  
this.onEnterFrame = function() {  
this.\_y = int(t-(t-this.\_y)/1.5);  
if (this.\_y\>t-1 && this.\_y\<t+1) {  
delete this.onEnterFrame;  
}  
};  
};

and heres where i am calling it:

playlists\_menu.list\_bg.onEnterFrame = function() {  
if (hitTest(\_root.\_xmouse, \_root.\_ymouse, true) && this.\_parent.playlist.\_height\>this.\_height) {  
ymin = this.\_y+this.\_height-this.\_parent.playlist.\_height;  
ymax = this.\_y+3;  
conv = (this.\_ymouse-15)_1.3/this.\_height;  
conv\>1 ? conv=1 : null;  
conv\<0 ? conv=0 : null;  
this.\_parent.playlist.easeY(ymax-conv_(ymax-ymin));  
}  
};

this works really great apart from it seems to apply itself to any movieclip!! so instead of moving the menu only when you mouse over it:

if (hitTest(\_root.\_xmouse, \_root.\_ymouse, true) && this.\_parent.playlist.\_height\>this.\_height)

the menu is moved when you mouse over any movieclip!!

any ideas?

cheers,  
G
