Hey everyone,
I’m having a hard time trying to figure out how to put boundaries on a slider menu I developed.
Here is my code that I have:
var myShape:Shape = new Shape();
myShape.graphics.beginFill(0x7E00E3);
myShape.graphics.drawRect(0,-35,605,70);
addChild(myShape);
menu_mc.mask=myShape;
function movement(event:Event):void
{
menu_mc.x = menu_mc.x + (0.5* myShape.width - mouseX) / 40;
}
stage.addEventListener(Event.ENTER_FRAME, movement);
it works great, but the menu system doesn’t stop, it just keeps on going. So far everything I have tried isn’t working. Any ideas?
Thanks for the help!