Hi all!
I have a textfield and a button component.The problem is when the textfield is focused and i click anywhere on the stage it remains focused and no focusout event occurs. I know that it’s because component classes implement IFocusManager(Component) interface and the TextField class does not .I do not want to create a new instance of FocusManager class or implement the IFocusManager interface in a custom class. Is there any way to disable the focusmanager ? The deactivate method does not seem to work in as3!:puzzled:
import fl.managers.FocusManager
var fm:FocusManager=new FocusManager(this)
fm.deactivate()
field.addEventListener(FocusEvent.FOCUS_IN,focusHandler)
field.addEventListener(FocusEvent.FOCUS_OUT,focusHandler)
field.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE,focusHandler)
field.addEventListener(FocusEvent.KEY_FOCUS_CHANGE,focusHandler)
function focusHandler(e:FocusEvent):void{
trace("
"+"type : "+e.type)
trace("target : "+e.target)
trace("relatedObject : "+e.relatedObject)
trace("__________________________________________")
}
Thanx in advance.