I have code to attach a blood effect movie clip. Right now it slows down the game too much. Is there a way to use bitmapdata to make it run faster?
for (b=1; b<bulletnum; b++) {
if (eval("bullet"+b).hitTest(enemy)) {
eval("bullet"+b).unloadMovie();
enemy.health -= gundamage;
var recoilX = enemy._x += Math.cos(player._rotation*Math.PI/180)*recoil;
var recoilY = enemy._y += Math.sin(player._rotation*Math.PI/180)*recoil;
bloodnum = random(3)+1;
var blood = _root.attachMovie("blood"+bloodnum, "blood"+depth, depth++);
blood._rotation = player._rotation+180;
blood._x = recoilX;
blood._y = recoilY;
enemy.play();
}