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
this helped me a lot thanks! :)
TheDarkGhoul 1 month ago
@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?
coolguyflex 8 months ago
wouldn't it be faster to use a boolean vector,
and then just set it by index?
coolguyflex 9 months ago
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?
segavagrant 10 months ago
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!
devanferreira 1 year ago
sweeeeeeeeeeeeeeeeeet
beatboxsimchayaffa 1 year ago
BEST INTRO EVER
And nice tutorial! Really helpful :D!
KeihyL 1 year ago
@ShadowErocos yes e stands for event. Some ppl use evt - it's the same as event. :)
Seryosin 1 year ago
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.
Timbe1987 1 year ago
exactly what I needed, thank you. I can't wait for the cs5 tutorials
Raluk54 1 year ago