But wouldn't the sword detects multiple collisions? Like if it hits both body and head the damage would be counted twice. I guess it's fine if I use bullet since the bullet will disappear on collision.
Loop the collision on the body parts and break the procedure after the first collision is made.

Well I don't know if as2 would allow typing a var as function
You can.

How does it know if it is shotgun or homing if I dont use switch case or if statement?
As Bluemagica suggested, simply create a static function for each type of attack:
Code:
function homingAttack(){...}
function shotgunAttack(){...}
...etc
Give the character a variable such as:

Code:
var attack:Function;
And when the weapon is changed, use the switch statement then to determine the attack and set the attack variable equal to the name of the function:

Code:
function chooseAttack(weaponType:Number):void {
     switch(weaponType) {
          case 0:
               attack = shotgunAttack;
               break;
          case 1:
               attack = homingAttack;
               break;
          default:
               attack = meleeAttack;
     }
}
When the character attacks, then simply called the attack var as function:

Code:
attack();