8 Replies Latest reply on Aug 20, 2007 11:13 PM by Flash Actions

    keyboard event listener

    Flash Actions
      ok so I want my keyboard event listener to listen for the z key. can you help me without changing my code to mutch? heres my code. I simply want to switch the CONTROL with the letter z.. So how hard is that. because i have been asking around on the internet a while and havent received a good answer.

      function detectText2(myevent:KeyboardEvent):void {
      if (myevent.keyCode==Keyboard.SPACE) {
      if (myevent.keyCode==Keyboard.CONTROL) {
      var mySound:topsound=new topsound();
      stage.addEventListener(KeyboardEvent.KEY_DOWN, detectText2);