13 Replies Latest reply on Oct 22, 2007 5:22 AM by chrisatflash

    Key.addListener(KeyListener) ... Is this a BUG??

    chrisatflash Level 1
      I had something strange.. i was trying to make a mini flash game.. but when i tested it,
      strange things happend. Some functions where initialized multiple times.

      I finaly found the peace of code that is causing this.

      When you test a movie (CRTL+ENTER) in Flash.. and you press in this example the space button.
      You see in the output ("run").
      But when you want to test this again with (CRTL+ENTER) ..you see ("run") 2 times..
      And if you continue to test it.. for example 6 times.. then with one press on the space button, you will
      see 6 times the trace output ("run');

      Is there a fix for this? This way you can't really test your movie..

      There should be when you press CRTL+ENTER a automatic removeListeners of all objects.