Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Navigate buttons using left/right keyboard arrows and enter

New Here ,
Jun 04, 2019 Jun 04, 2019

I have 4 buttons over a fullscreen video and want to show when the buttons are being selected(button grows 20% it's size) using left/ right arrows and when pressing Enter on any button they will take you to Scene 2.

So far I can only do this with mouse and clicking, I would like to use only the keyboard. How can I do this? Also... when I create a Scene 2 the video in Scene 1 looks white

https://ibb.co/C0TY2V0

Thank you for reading!! I really appreciate your help

349
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 04, 2019 Jun 04, 2019

use a keyboard event listener:

this.addEventListener(KeyboardEvent.KEY_DOWN, downF);

function downF(e:KeyboardEvent):void{

trace(e.keyCode);

}

Translate
Community Expert ,
Jun 04, 2019 Jun 04, 2019

js or as3?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 04, 2019 Jun 04, 2019

Sorry, as3

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2019 Jun 04, 2019
LATEST

use a keyboard event listener:

this.addEventListener(KeyboardEvent.KEY_DOWN, downF);

function downF(e:KeyboardEvent):void{

trace(e.keyCode);

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines