// set the mouseover callback..
button.mouseover = function(data){
this.isOver = true;
if(this.isdown)return
this.setTexture(textureButtonOver)
}
// set the mouseout callback..
button.mouseout = function(data){
this.isOver = false;
if(this.isdown)return
this.setTexture(textureButton)
}
button.click = function(data){
// click!
console.log("CLICK!");
// alert("CLICK!")
}