PDA

View Full Version : Process TextEvent first



DFox
November 28th, 2008, 01:32 AM
Hi,

I have an application that is using a MouseDown event on the stage, and a TextEvent to process links within an a TextField that shows HTML (links use a href). When the user clicks on the text link, the MouseDown event for the stage is processed first. I need it to process the TextEvent for link processing before it does the MouseDown one. Does anyone know a way to accomplish this? I tried using the priority in addEventListener, but that appears to only be for the same exact listeners.

Thanks in advance.

Regards,
~David

ViktorHesselbom
November 28th, 2008, 08:34 AM
This is because TextEvent.LINK gets called only after you release your mouse, ie on click and not press. The only way to solve this is to use MouseEvent.CLICK or MouseEvent.MOUSE_UP instead of mousedown.

DFox
November 28th, 2008, 01:16 PM
This is because TextEvent.LINK gets called only after you release your mouse, ie on click and not press. The only way to solve this is to use MouseEvent.CLICK or MouseEvent.MOUSE_UP instead of mousedown.

Wow, thank you sooooo much! I overlooked that simple concept. MOUSE_UP and priorities works like a charm!

Thanks again.