Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Action Script 3 Tutorial Multiple Key Detection

Loading...

Sign in or sign up now!
12,434
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 2, 2009

Learn how to create a class for multiple key detection using action script 3. You will need to see my custom class tutorials. This way you can reuse the Action Script 3 Multiple Key Detection class. get the links and code at my site http://www.onenterflash.com/2009/11/action-script-3-tutorial-multiple-key.html

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 10 dislikes

Link to this comment:

Share to:
see all

All Comments (21)

Sign In or Sign Up now to post a comment!
  • this helped me a lot thanks! :)

  • @coolguyflex Oh sorry, i forgot. You can't set indexes like that in vectors.

    Well a boolean array then, wouldn't that be more efficient?

  • wouldn't it be faster to use a boolean vector,

    and then just set it by index?

  • There IS a way to get your keys to get detected along with other keys with the help of Boolean Variables. I tried it out with Run, and i got it. Anyone need the code?

  • could you please make a tutorial on making the hero attack in both directions!!!? i tried multiple times to do it myself but he only attacks one direction? :( plz help!

  • sweeeeeeeeeeeeeeeeeet

  • BEST INTRO EVER

    And nice tutorial! Really helpful :D!

  • @ShadowErocos yes e stands for event. Some ppl use evt - it's the same as event. :)

  • Wouldn't it be better to just set keyspressed[e.keyCode] to 'true' and 'false' each time and then return keyspressed[keys]? I don't know how actionscript handles the 'in' keyword but I guess it would iterate over the entire array. Thus, you're doing the check in O(n) instead of O(1) which it should be. Also, I guess that delete actually removes the references from the associative array, which is considerably slower than just changing a boolean.

  • exactly what I needed, thank you. I can't wait for the cs5 tutorials

Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more