Im trying to do a simple little zelda rpg kind of game. I've made a little box that moves around now i want him to stop when i hits a certain object. I've made it work if that object is in the root of the movie (just like the moveable box), but if i put it inside another movieclip it doesn't work

so basically:
doen't work
if (gubbe.hitTest(main.walls.wall)) {
} else if (Key.isDown(Key.LEFT)) {
this._x -= this.speed;
gubbe._rotation = 180;
}
works
if (gubbe.hitTest(wall)) {
} else if (Key.isDown(Key.LEFT)) {
this._x -= this.speed;
gubbe._rotation = 180;
}