I got a textInput field, to which I attach a listener for mouseOver event. When mouse goes over this field it should do some basic stuff, like get the field's ID. But I get error becouse the 'e.target' object doesn't have the 'ID' property. Debugger shows that 'e.target' is a textField not a textInput. It seems that mouse is over textField which is inside my textInput, and that textField doesn't have an 'ID' property.
My listener works only when mouse is over the thin border of textInput. This border is around the textField, which is inside my textInput.
Does anybody have an idea how to repair this situation?
Use the event currentTarget property. With controls like TextInput and Button, etc. that have sub-controls, you need to refer to the currentTarget property, not the target property.
If this post answers your question or helps, please mark it as such.
Greg Lafrance - Flex 2 and 3 ACE certified
Flex Training and Support Services
i was always wondering what's the difference between target and currentTarget:)