1 Reply Latest reply on Feb 10, 2011 4:23 PM by Ned Murphy

    if (Key.isDown(Key.("A")) { ??????????

    UltimateFlashxz

      Hey all.

       

      im having trouble trying to figure out how to make a letter key (A-Z) to used to pause, use abilities, etc etc.

      if (Key.isDown(Key.("A")) {

      ^ is the code i have at the moment and i get errors. im still new to flash maybe about a few days in and would be greatful if someone could correct the code since i cant seem to.

      Here is the full code to see what im working with.

      onClipEvent(enterFrame) {

      if (Key.isDown(Key.UP)) {

      this._y-=7;

      this.gotoAndPlay(2);

      }

      if (Key.isDown(Key.DOWN)) {

      this._y+=7;

      this.gotoAndPlay(3);

      }

      if (Key.isDown(Key.RIGHT)) {

      this._x+=7;

      this.gotoAndPlay(4);

      }

      if (Key.isDown(Key.LEFT)) {

      this._x-=7;

      this.gotoAndPlay(5)

      }

      if (Key.isDown("A")) {

      this.gotoAndPlay(6)

      }

      }