Introducing My New GitHub

In preparation for my upcoming tutorials for Flash (and other similar posts I have planned) I have just created a GitHub account! 🙂

GitHub seems to be all the rage for open source fans out there, so I’ve decided it will be the best place to host my various creations for anyone to use.

Link: https://github.com/cleod9

I will be uploading not just Flash, but coding examples in other languages as well such as C, C++, Java, JavaScript, PHP and potentially many more.

 

For starters, here’s an AS3 class for easy keyboard input management in Flash:

Source Code: https://github.com/Cleod9/AS3/tree/master/Key

I have created the above class to simplify keyboard input management in Flash. Back in the days of ActionScript 2.0, you used to only have to call one function to get the state of a key press. In AS3 it’s become a pain – you have to set up multiple events just to be sure of whether or not a key is currently held down. With my Key class, you simply initialize it and you’re done! Anywhere in your program you can type the simple words Key.isDown(keyCode) just like in AS2, and you’ll be able to get the state of any key without having to create a bunch of extra event mess. This is definitely one of the most useful pieces of code in all of my games (especially SSF2), since it completely centralizes key press management.

I will be adding many more utilities like this, so stay tuned for more updates!