Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

addEventListener is not working

New Here ,
May 14, 2015 May 14, 2015

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....

TOPICS
ActionScript
218
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 14, 2015 May 14, 2015
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines