the scripting i have is here... the sword and the guy are on the same layer and movie clip.. like it works with the swinging you just have to move the guy because the action script that says if no keys are press stop is blocking the animation

Code:

onClipEvent (load) {
walkSpeed = 6;
stop();
}
onClipEvent (enterFrame) {
function checkCoords(x,y,direct){
guyTL = _root["tile_"+Math.floor((x-(_parent._width/2)+1)/_root.tileWdth)+"_"+Math.floor((y-(_parent._height/2)+1)/_root.tileHght)].barrier;
guyTR = _root["tile_"+Math.floor((x+(_parent._width/2)-1)/_root.tileWdth)+"_"+Math.floor((y-(_parent._height/2)+1)/_root.tileHght)].barrier;
guyBR = _root["tile_"+Math.floor((x+(_parent._width/2)-1)/_root.tileWdth)+"_"+Math.floor((y+(_parent._height/2)-1)/_root.tileHght)].barrier;
guyBL = _root["tile_"+Math.floor((x-(_parent._width/2)+1)/_root.tileWdth)+"_"+Math.floor((y+(_parent._height/2)-1)/_root.tileHght)].barrier;
switch(direct) {
case 0:
if (guyTL || guyTR) {
return false;
}
case 1:
if (guyBR || guyBL) {
return false;
}
case 2:
if (guyTR || guyBR) {
return false;
}
case 3:
if (guyTL || guyBL) {
return false;
}
}
return true;
}
if (Key.isDown(Key.UP)) {
play();
_rotation = 180;
if (checkCoords(_parent._x, _parent._y - walkSpeed,0)){
_parent._y-= walkSpeed;
}}
if (Key.isDown(key.RIGHT)) {
play();
_rotation = 270;
if (checkCoords(_parent._x + walkSpeed, _parent._y,2)){
_parent._x+= walkSpeed;
}
}
if (Key.isDown(key.LEFT)) {
play();
_rotation = 90;
if (checkCoords(_parent._x - walkSpeed, _parent._y,3)){
_parent._x-= walkSpeed;
}}
if (Key.isDown(key.DOWN)) {
play();
_rotation = 0;
if (checkCoords(_parent._x, _parent._y + walkSpeed,1)){
_parent._y+= walkSpeed;
}
}
if (!Key.isDown(key.UP) & !Key.isDown(key.DOWN) & !Key.isDown(key.LEFT) & !Key.isDown(key.RIGHT)) {
stop();
}
var name ="tile_"+Math.floor((_parent._x / _root.tileWdth))+"_"+(Math.floor(( _parent._y /_root.tileHght)));
if (_root[name].isDoor) {
_root.changeMap(_root[name].toMap,_root[name].guyX,_root[name].guyY);
} else {
_root.justMoved = false;
}}
on(keyPress"<space>"){
gotoAndPlay("guy", 7);
}