A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to link key presses to buttons on Flash CS6?

  1. #1
    Junior Member
    Join Date
    Sep 2015
    Posts
    1

    How to link key presses to buttons on Flash CS6?

    I have existing right and left buttons which carry out functions, and I would like the right and left button to also be responsive to the left and right keys on the keyboard.

    How should I edit this button code?

    rightbutton.onRelease = function() {
    rotation_answer=answer_right;
    gotoAndPlay(2);
    }

    I tried this but it's not working.
    rightbutton.onKeyRight = function() {
    rotation_answer=answer_right;
    gotoAndPlay(2);
    }

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    Try looking or elsewhere you can find for simple tutorials, easier than telling you.

    You might need to click the flash area first to get focus!!

    http://www.flashfridge.com/tutorial.asp?ID=10
    Last edited by fruitbeard; 09-25-2015 at 08:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center