# Creating a bullet

**URL:** https://forum.kirupa.com/t/creating-a-bullet/183371
**Category:** Uncategorized
**Created:** [March 26, 2006, 12:42pm UTC](https://forum.kirupa.com/t/creating-a-bullet/183371 "2006-03-26T12:42:37Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![woopsedoo](https://avatars.discourse-cdn.com/v4/letter/w/a87d85/32.png) [@woopsedoo](https://forum.kirupa.com/u/woopsedoo)
#### Post date: [March 26, 2006, 12:42pm UTC](https://forum.kirupa.com/t/creating-a-bullet/183371/1 "2006-03-26T12:42:37Z")

</div>

ive got an mc (man) rotating to the mouse bu i cant seem to get it to fire when i press space and go in the direction that the man was facing when it was pressed the cod i have so far is

```auto

bs = 3;
Key.SPACE.onKeyDown = function() {
 bullety.duplicateMovieClip("bullet"+i++, i, {onEnterFrame:function () {
  this._x = _root.man._x;
  this._y = _root.man._y;
  this._x += Math.sin(this._rotation/180*Math.PI)*bs;
  this._y -= Math.sin(this._rotation/180*Math.PI)*bs;
 }});
};

```

any help is apreciated

even if any one knows a good tutorial that i could use

thanks
