PDA

View Full Version : Movie clip point towards the mouse


Ludatha
11-18-2008, 08:14 PM
Hey, I'm just trying to make a simple game in flash, I was wondering how to make, say, the turret of a tank, to face towards the mouse.

Could anyone help, I have looked at 2 tutorials on the internet, and both do not work. :/

- Adam

gnomeontherun
11-19-2008, 02:15 PM
http://www.senocular.com/flash/source.php?id=0.16

This one is good, I haven't looked at the code but you could find the code that makes the arrow move. Also, if you have the movieClip centered, then it won't pivot. Rather you have to have the image with the registration point at the end you want to say put.

Ludatha
11-20-2008, 05:11 PM
Thanks! I got it to work :)