This content has been marked as final. Show 5 replies
Ok this is what I've done so far...
_menuHolder Sprite belongs to the _holder sprite. _h contains the total height of the menu.
All the methods and variables are static, so AMenu is the name of the Class.
var posY:Number = (((AMenu._holder.mouseY/AMenu._menuHolder.height)*
AMenu._menuHolder.y = -posY;
I was just experimenting, so it isn't perfect and it doesn't work as I wanted to...
Hope you can help me.
well, you can try Tween Class.
Well I've done it so thanks anyway...
This is the code:
var posY:Number = (AMenu._menuHolder.y+AMenu._menuHolder.height+AMenu._holder.mouseY-AMenu._h/4)/5;
AMenu._menuHolder.y -= posY+(AMenu._holder.mouseY-AMenu._menuHolder.height)/5;
For a past few minutes I was playing a little bit with math and look what it came out:
this._menuHolder.y = (this._h/4)-(this.mouseY*2);
This is the same code from my last post, but without easing...
Maybe someone will find it useful.
Have a nice day.