Skip to main content
Participating Frequently
May 14, 2015
Question

addEventListener is not working

  • May 14, 2015
  • 1 reply
  • 235 views

i have a very simple code. a movieClip on stage with the instance name btn.

i added an eventListener:

btn.addEventListener(MouseEvent.MOUSE_DOWN,someFunction);

function someFunction(e:MouseEvent):void{

            trace("yes");

            }

i  just cant see anything wrong with this code, so i tried to make all kind of tests  nothing worked. i even made a new symbol and  took the instance name of a button  that is working and i simply put it on the new symbol and it doesnt work!

is this a bug?!!!!!

probably not but i  cant add any buttons....

This topic has been closed for replies.

1 reply

Participating Frequently
May 14, 2015

ok...i found the problem! i had an invisible btn covering the area where  the button was staged......