Flash AS3 – Capture Keyboard Input Tutorial & Video Game Basics in CS3 + CS4

Source Files – http://www.developphp.com/video/Flash/Capture-Keyboard-Input-to-Make-User-Keyboard-a-Control-Interface

ActionScript 3.0 CS3 + CS4 tutorial and source files for learning how to capture keyboard input and program flash games that operate on the keyboard.


16 thoughts on “Flash AS3 – Capture Keyboard Input Tutorial & Video Game Basics in CS3 + CS4”

  1. if you set the "registration point" of theShip exactly on the nose (so the nose tip was on x:0 and y:0), you wouldnt have to guess the x and y value to use for the laserShot.
    Also, a tip for centering things –> laserShot.x = (theShip.width/2)-(laserShot.width/2); Great intro to actionscript – nice and easy pace.

  2. the listener code won't log most my keys. just the numbers, arrows and a few of the keys to the right of the keyboard. help anyone??

  3. I got to say thank you for providing this video, well conducted, very easy to follow through, you explain the purposes of the code very well and it is going to help me greatly in class, thank you once again.

  4. Not sure what you mean, I programmed it in using the A key… D key… Space key or any other key I want… what are you talking about?

    I proved it to you in the video, every bit of my programming is on screen for you to see… explain further please cuz that does not make sense to me.

  5. great tut, very helpful thanx 😀

    as a side note, you can improve the code by combining the if conditionals with && and also just put -=, not -=+ (+= not +=+)

    if (keycharcode==97 && theShip.x>leftBounds) {theShip.x-=shipSpeed;}

  6. great tutorial, not finished it yet but it is great, at 20:28 atm but I have a problem :(.
    I checked for errors just like you said, but I have a syntax error at 'var laserBlaster.laser = new laser();

    Syntax Error: Expecting semicolon before dot

    what do i do?

    btw great tut!

Leave a Reply

Your email address will not be published. Required fields are marked *