Hi. I am trying to create that perspective effect where movie clips move along the x axis at different speeds so it looks kind of 3dish. I’ve adapted the follow mouse code from the tutorial here on kirupa and got this far:
onClipEvent (load) {
_x = stage.width/2;
speed = 100;
}
onClipEvent (enterFrame) {
endX = _root._xmouse;
_x += (endX-_x)/speed;
}
I have this code on 3 different mcs at 3 different speeds which looks ok. Problem is at the moment they follow the mouse and I would like them to be repelled by the mouse; exactly the same, but the opposite. I had a fiddle and tried the speeds as minus numbers but it went a bit odd, it looked as if it was gonna work but things just flew off the screen. Any help would be great, thanks in advance.
<"))))><