# AS2 need help making moviclip point at and follow other movie clip

**URL:** <https://forum.kirupa.com/t/as2-need-help-making-moviclip-point-at-and-follow-other-movie-clip/315923>\
**Category:** flash\
**Created:** [November 7, 2010, 11:29pm UTC](https://forum.kirupa.com/t/as2-need-help-making-moviclip-point-at-and-follow-other-movie-clip/315923 "2010-11-07T23:29:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cormac](https://avatars.discourse-cdn.com/v4/letter/c/b19c9b/32.png) [@Cormac](https://forum.kirupa.com/u/Cormac)\
**Post date:** [November 7, 2010, 11:29pm UTC](https://forum.kirupa.com/t/as2-need-help-making-moviclip-point-at-and-follow-other-movie-clip/315923/1 "2010-11-07T23:29:52Z")

</div>

I’ve only been using flash for a short while and, before you dismiss this I have trawled forums in search of an answer to this question - maybe I missed something but I’m fairly sure I didn’t.

What I want to do is make a movieclip to point at another **movieclip** , not the mouse(there are plenty of tutorials for that). I have tried to use a number of formulas to solve this including:  
bulletenemy1.\_rotation = (Math.asin(((bulletenemy1.\_y - car.\_y) / (Math.sqrt(((car.\_x - bulletenemy1.\_x) \* (car.\_x - bulletenemy1.\_x)) + ((car.\_y - bulletenemy1.\_y) \* (car.\_y - bulletenemy1.\_y))))))) \* Math.PI / 180;

and

bulletenemy1.\_rotation = Math.atan2(\_root.car.\_y - bulletenemy1.\_y, \_root.car.\_x - bulletenemy1.\_x);

which haven’t worked.

I’m also trying to work out how to make a movieclip chase another and wondering what’s wrong with this piece of code:

r = 10/(((car.\_y - bulletenemy1.\_y) \* (car.\_y - bulletenemy1.\_y)) + ((car.\_x - bulletenemy1.\_x) \* (car.\_x - bulletenemy1.\_x)))  
bulletenemy1.\_y += Math.sqrt((car.\_y - bulletenemy1.\_y) \* r)  
bulletenemy1.\_x += Math.sqrt((car.\_x - bulletenemy1.\_x) \* r)

Any help or pointers is greatly appreciated and thanks in advance.
