[RESOLVED] addEventListener problem
Hi all,
I have a problem with the event listener on a movieclip that has a dynamic text field. The problem is that in my event listener handler method:
Code:
//this works fine
this[section]["subsection"+i].addEventListener(MouseEvent.MOUSE_UP,processSubSectionClick);
...
...
//this trace gives the instance id of the dynamic text
function processSubSectionClick(evt:MouseEvent):void{
trace("button clicked = "+evt.target.name)
}
The true problem is that if I click on the button where the dynamic text is, I get the instance id of the dynamic text, which is not what I want. If i click on the button but not on the text, I get the correct result. Its if as though the text has precedence on the mouse event listener.
Code:
Example output:
button clicked = dt_subsectionTitle //wrong: clicked on Dynamic Text
button clicked = subsection0 //correct mc instance id: clicked on button image away from text
Has anybody seen this before and is there a solution?
Regards
Jason