Can't move

i’m having a problem right now cause i’m not so good in AS…just a newbie. this is my problem. i create movieclip (i named it mcContainer), then inside the mcContainer, i made another two movieclip - mcPath and mcHero. the mcPath function as a path while the mcHero is the one that i want it to be move by player using keyboard…mcHero can be moved but i want it to move only inside the mcPath areas. i’m trying to make a maze game right now…anyone could help with my probs??? for now this is the AS i use in mcHero

onClipEvent (enterFrame) {
if (Key.isDown (Key.RIGHT)) {
gotoAndStop("right");
this._x += 6; 
}
if (Key.isDown (Key.LEFT)) {
gotoAndStop("left");
this._x -= 6; 
}
if (Key.isDown (Key.DOWN)) {
gotoAndStop("down");
this._y += 6;
}
if (Key.isDown (Key.UP)) {
gotoAndStop("up");
this._y -= 6; 
}
if(!this.hitTest(_root.mcContainer.mcPath._x,_root.mcContainer.mcPath._y,true)){
    
    _x = oldx;
    _y = oldy;
}
oldx = _x;
oldy = _y;
}