To remove the highlight when the mouse moves away from both text fields, we would first register both text fields to receive the MouseEvent.MOUSE_OUT event : MouseEvent : TextField Flash / Flex / ActionScript examples
To remove the highlight when the mouse moves away from both text fields, we would first register both text fields to receive the MouseEvent.MOUSE_OUT event
private function mouseOutListener (e:MouseEvent):void { // If the highlight is present... if (e.target.parent.contains(bgRect)) { // ...remove it e.target.parent.removeChild(bgRect); } } } }
Related Scripts with Example Source Code in same category :