3 Replies Latest reply on Aug 21, 2007 6:56 AM by Rothrock

    keyCode Keyboard Events

      The following code is giving me an error 1119:

      function keyPressed(event:Event):void {
      if (event.keyCode == Keyboard.ENTER) {
      mainText.text = myGreeter.sayHello(textIn.text);

      The error says Access of possibly undefined property keyCode through a reference with static type flash.events.Event if(keyCode == Keyboard.ENTER).

      Should the double equals sign (equality) be a single one?