Encapsulate your code in pre tags, like this
my code+ - _ #¤%&/(
As for the problem,
heroY; doesn’t do anything.
I recommend you not to use the built in hitTest.
Also it seems you’re first checking if the hero touches a tree from the model:
else if (gameMap[heroY + 1][heroX] == 4)
And then you remove any wood displayobjects it touches. You should either have all the logic in the model (checking for collision and removing wood in the gameMap, and draw everything every from the model, or you could have the logic be in the displayObjects (the wood and movieclips)