# Attaching bullet at the barrel of the gun

**URL:** https://forum.kirupa.com/t/attaching-bullet-at-the-barrel-of-the-gun/168427
**Category:** Uncategorized
**Created:** [November 7, 2005, 5:45am UTC](https://forum.kirupa.com/t/attaching-bullet-at-the-barrel-of-the-gun/168427 "2005-11-07T05:45:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![stuartRowe](https://avatars.discourse-cdn.com/v4/letter/s/cc9497/32.png) [@stuartRowe](https://forum.kirupa.com/u/stuartRowe)
#### Post date: [November 7, 2005, 5:45am UTC](https://forum.kirupa.com/t/attaching-bullet-at-the-barrel-of-the-gun/168427/1 "2005-11-07T05:45:29Z")

</div>

Hi, I’m just tinkering with a platform game, with similar shooting to heli attack 3. I’m having trouble getting the bullet to appear at the barrel of the gun when I click. I had the bullet doing this before, except it was inside a few movieclips, and they rotated, and when they did so, the bullet would change even though it had been fired. I tried calculating the position based on the distance bewteen the vertex of the movie clip that rotates and the end of the gun, and tried to have the appropriate x and y changes based on the angle that the gun was rotated to, however the x and y position of the movie clip was calculated based on the top left corner. I’ve attached my .fla, hopefulyl somone can give me some advice. thanks.
