In this video tutorial, you can learn the gunshot effect in flash using AS3.0.
Website: http://samsolomonprabu.com/
Here's the source code:
----------------------------
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.MovieClip;
stage.addEventListener(Event.ENTER_FRAME, mouseCursor);
stage.addEventListener(MouseEvent.CLICK, shot);
function mouseCursor(e:Event):void{
crossHair.x = mouseX;
crossHair.y = mouseY;
stage.setChildIndex(this, this.parent.numChildren - 1);
Mouse.hide();
}
function shot(e:MouseEvent):void{
var gun:gunShot = new gunShot();
gun.x = mouseX;
gun.y = mouseY;
stage.addChild(gun);
}