[AS3] addEventListener for Mouse Over
I have a text box that I want to display "tips" in, for example I have a text box with text in it and I added an event listener for mouse over but I realized i have no way to tell the function what text to display. When I try to do something like the following, I just get error messages:
Code:
txtpName.addEventListener(MouseEvent.MOUSE_OVER, tipText("This is your name");
public function tipText (tip:String, e:Event):void {
txtTip.text = tip;
}
Can anyone help me figure out how to make this work?
Thanks in advance,
ChaseNYC