function enemyFire(event):void
{ var currentEnemy:Object = event.currentTarget;
trace(currentEnemy.name)
if (currentEnemy.name == "red" { trace("red gunfire" } else if (currentEnemy.name == "blue" { trace("blue gunfire" } else if (currentEnemy.name == "green" { trace("green gunfire" }
}
now you might say what is the point of .currentTarget but you can use the object that you declared as the current target (in this case I used currentEnemy) and use its x and y coordinates for whatever you need.