# Making an arrow/bullet move where the mouse was

**URL:** <https://forum.kirupa.com/t/making-an-arrow-bullet-move-where-the-mouse-was/273284>\
**Category:** Uncategorized\
**Created:** [October 14, 2008, 12:02am UTC](https://forum.kirupa.com/t/making-an-arrow-bullet-move-where-the-mouse-was/273284 "2008-10-14T00:02:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arosemena](https://avatars.discourse-cdn.com/v4/letter/a/a3d4f5/32.png) [@arosemena](https://forum.kirupa.com/u/arosemena)\
**Post date:** [October 14, 2008, 12:02am UTC](https://forum.kirupa.com/t/making-an-arrow-bullet-move-where-the-mouse-was/273284/1 "2008-10-14T00:02:17Z")

</div>

i want to make a game where u shoot arrows at the mouse direction, i have everything exept for that, i think is trigonometry, i have seen it on many games but i cant seem to figure it, if anyone can help me?

im planning to make the arrow something like this

onClipEvent(enterFrame)  
{  
if(Key.isDown(Key.SPACE) && \_root.readytoshoot == 1)  
{  
//Shoot arrow  
\_root.mycharacter.attachMovie(“arrow”,“a rrow”+i,\_root.getNextHighestDepth());  
i++;  
\_root.readytoshoot = 0;  
}  
}

And the arrow MC will have something like this:

onClipEvent(enterFrame)  
{  
timer = 0;  
if(timer \> 100){removeMovieClip(\_parent);\_root.read ytoshoot = 0;}  
else{timer++;}

// THIS IS THE PART WHERE I NEED HELP  
this.\_x +=  
this.\_y +=  
}
