I need some help. I'm working on a cookie clicker style game, and I want a textfield to display the user's score. All it does, is clear the text field.
var score:int;
button_2.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
score = score + 1;
txt.text = score.toString();
}
What's wrong with my code?