label each of the 8 frames as thus
left
right
up
down
right-up
right-down
left-up
left-down
and then on the car movieclip, assign the following actionscript:
although, it would look better if you used trig to smoothly rotate the vehicle as stickman said.Code:onClipEvent (enterFrame) { mousex = _root._xmouse; mousey = _root._ymouse; currentx = getProperty (this, _x); currenty = getProperty (this, _y); if ((mousex > currentx )and(mousey > currenty)) { gotoAndStop ("down-right"); } if ((mousex > currentx )and(mousey < currenty)) { gotoAndStop ("up-right"); } if ((mousex < currentx )and(mousey > currenty)) { gotoAndStop ("down-left"); } if ((mousex < currentx )and(mousey < currenty)) { gotoAndStop ("up-left"); } if ((mousex = currentx )and(mousey < currenty)) { gotoAndStop ("up"); } if ((mousex = currentx )and(mousey > currenty)) { gotoAndStop ("down"); } if ((mousex > currentx )and(mousey = currenty)) { gotoAndStop ("right"); } if ((mousex = currentx )and(mousey > currenty)) { gotoAndStop ("left"); } }
this'll do as a substitute if maths and physics scare the living beejesus out of you.
Bruce




Reply With Quote