I looked this up on Google and watched a video, but this doesn't work for me.
When I try to link a symbol in the library with an AS Linkage, then attach it to a BitmapData variable, this error code shows:
Scene 1, Layer 'Layer 1', Frame 1, Line 4 1067: Implicit coercion of a value of type Gun to an unrelated type flash.display:BitmapData.
I don't use bitmap or bitmapdata much, and I don't use classes much, so I have no idea what is wrong. This is my code:
var gun:BitmapData = new Gun;
You can't declare it as BitmapData - BitmapData is just raw bitmap data :)
Since you have declared MovieClip as Base Class, this should become a MovieClip:
var gun:MovieClip = new Gun();
If your gun has no timeline (so it's a graphics with just one frame), set the Base Class to Sprite and handle it as sprite - this is better for memory and performance:
var gun:Sprite = new Gun();