Hello everybody, just joined and I hope someone can help me.
I don’t know if I have this right but I want the ‘cat_mc’ to ‘flip’ to face the cursor if the cursor is on the left side of the ‘cat_mc’ and flip back if it’s on the right side once the cursor has passed over. If that makes sense. Thanks for taking the time to read my question.
ps. this part of the code fires when you ROLLOVER buttons.
function followCat(event:Event):void {
stage.addEventListener(Event.ENTER_FRAME,followCat);
var where_mouse = mouseX;
var dx:int=cat_mc.x-mouseX;
cat_mc.x-=dx/5;
if(mouseX > where_mouse) {scaleX = -1;
} else if
(mouseX < where_mouse) {scaleX = 1;
}
}