So eventually I’d like to get a menu to scroll inside a masked area. I created this to kind of play around with it and see if it would work. The problem is I need the menu_mc movie clip to move to the left when I move the mouse to the right, and to the right when I move the mouse to the left.
I know that I’ve seen some great menus like this before, but I can’t remember where. If anyone could help me out or could point me in the direction of a tutorial, that’d be swell!
thanks!
If you need to see the .fla, just let me know and I’l upload it…
My as:
var speed:Number = 5;
var menuSize:Number = menu_mc._width;
var menuMiddle:Number = menu_mc._x;
var maskSize:Number = mask._width;
var center:Number = Stage.width/2;
menu_mc.onEnterFrame = function() {
var x:Number = _root._xmouse;
if (x>=(menuMiddle+((menuSize-maskSize)/2))) {
x = (menuMiddle+((menuSize-maskSize)/2));
}
if (x<=(menuMiddle-((menuSize-maskSize)/2))) {
x = (menuMiddle-((menuSize-maskSize)/2));
}
this._x += (x-this._x)/speed;
};