VF said
patrickjansen said
I remember encountering this problem too and looking for a solution… I think I never found one.
Yes, looks like no straightforward ways. We don’t have following 2 things which causes this simple task impossible.
1. Two overlapped siblings simultaneously can’t sense same mouse event
2. For Text Field, the mouseEnabled property always applies to the text field’s bounding box as well as text content. No separate properties or no mouseChildren property for Text field.
Another thing that doesn’t related to this issue is logically the mouseEnabled property should be ‘false’ by default. Couldn’t understand why it should be enabled even without having events added. I doubt they will ever change these things even after 5-6 years from now. Well known pains!
patrickjansen said
One extreme solution would be to set textfield mouse-disabled, ‘extract’ the bounding box of the text(s) containing the link (optionally in some off-stage texfield clone) and generating a 0% alpha rectangle with the link-click function on top of it
That is a possibility, I thought the same but afraid to sacrifice the link and hover styles!
1: Well, they can sense the same mouse event, obviously you have to register the same listener to both the objects.
2: The mouseChildren refers only to the object’s children, textfields can’t have children. A child is an object contained by another one (eg a movieclip contained by another movieclip).
The extreme solution seems more complicated than simply add to the textfields the same mouse events of the object below them…
I think you can simply solve this by adding the same over and out event listeners of your clip to your textfield.