Question
HTML5 Canvas keypress (keydown) to tigger the same function as a click event
I am using the click event, but would like to use a key press (keydown) on the right arrow to fire the same function nextPage_2
this.page_1.nextBtn.addEventListener("click", nextPage_2.bind(this));
function nextPage_2()
{
createjs.Tween.get(this.page_2).to({alpha: 1}, 800, createjs.Ease.quadOut);
}This may be quite simple but i cant find the answer. Please help 🙂
