something like this perhaps -
Code:
black = new TextFormat();
black.size = 12; black.color = 0x000000; black.align = "center";
white = new TextFormat();
white.size = 12; white.color = 0xFFFFFF; white.align = "center";
TextField.prototype.hitTest = hitTest;
this.createTextField("field1",1,100,100,100,20);
field1.selectable = false;
field1.border = true; field1.borderColor = 0xFF0000;
field1.background = true; field1.backgroundColor = 0xCCCCCC;
this.onMouseMove = function(){
if(field1.hitTest(_level0._xmouse, _level0._ymouse)){
field1.text = "that's nice"; field1.setTextFormat(white);
field1.backgroundColor = 0x000000; field1.borderColor = 0x00FF00;
} else {
field1.text = "hit me"; field1.setTextFormat(black);
field1.backgroundColor = 0xCCCCCC; field1.borderColor = 0xFF0000;
}
};
this.onMouseDown = function(){
if(field1.hitTest(_level0._xmouse, _level0._ymouse)){
field1.text = "ouch";
field1.setTextFormat(white);
field1.backgroundColor = 0xFF0000;
}
};