[as3]How do i make a machine gun in tds games?

First of all, this is for a top down game! Now I am asking, how to make stuff like machineguns?

normally in pistols, when mouse is clicked, i create a bullet instance, add it to an array and then use a for loop to check whether it collides or not, etc! But this approach dosen’t seem to be really efficient, since in machineguns there will be many bullet instances(think 120 rpm or more) and moreover the troubles get increased if multiple npc’s were to carry these guns as well!

i read somewhere that bitmapData can be used to remedy this situation, but i have no idea how, so guys please share your knowledge with me in this regard so ashow to create thousands of instances/whatever without causing lag!

Also in the same line, can you suggest how to do instant bullet hits? If i create a virtual line and check every point on it for collision, then i am afraid it may again not be very efficient in the above situation!