Disable character animation when button is pressed

hey guys.

iam trying to fix an error in my game: you can find the current status here: https://dl.dropboxusercontent.com/u/52617394/webplayer.html

its nothing big at the moment but a beginning at least :wink:
so, the problem is, when I press one of the three buttons the character is starting his punching animation and when i place a building he stargt to punch again. which is not so bad because he should start this punching thing when you press the left mousekey.

my question is, how do i disable the punching animation when iam in the button area? and how do i stop it when iam placing one of the objects (ffence, log or bridge)

First of all - nice game!

Connecting to you question I think you should remember the buttons rectangle and check mouse position. If mouse clicking over the buttons area you will disable animation, in other words don’t play animation if mouse clicking over the button.
But the right way is to have only one Controler Controller wich responsible for key and mouse input and all ckecks, another components should use him to detect actions.

yeah, your game is nice, like it

whenever i click the mouse the player does nothing, and when i press the space bar, has a strange move.
as a suggestion, try another statements to control your character controller, probably remaking it would solve more than one problem.

by the way how did you make the water?