Skip to main content
Inspiring
March 28, 2016
Answered

equivalent createjs code for flash keyboard code snippet

  • March 28, 2016
  • 1 reply
  • 697 views

for flash cc

stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void

{

  trace("you press any of your keyboard button");

}

for createjs it should altert in browser once i press any button

/*js

stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void

{

  alert('you press any of your keyboard button');

}

*/

This topic has been closed for replies.
Correct answer robdillon

Here's a thread that discusses canvas key events: Canvas - controlling object with js keypress function

1 reply

robdillon
robdillonCorrect answer
Participating Frequently
March 28, 2016

Here's a thread that discusses canvas key events: Canvas - controlling object with js keypress function