Quick post here, a simple solution I found to have multiple keys enabled. Maybe most real game developers know better or more elegant solutions, but I found this useful enough to share it with you.
Posts about Code snippets
I created a useful util-class to make delayed function calling easy. You can make a chain of functions, by adding them with a delay in milliseconds. This chain can be executed multiple times, even in reversed order.
I found out the getBounds()-function gives not exactly the right rectangle with a TextField. It always matches the border bounds, even if the borders are invisible. So i’ve created a more accurate function using getColorBoundsRect().
Found out something useful, which I’d like to share with you. It’s about calculating the width of menu-items perfectly.
Imaging you are creating a liquid website with a menu. If you want all items to have the same width, you could set the width of each item to totalMenuWidth / items.length. In most cases this will work out. But what is your menu is very small or the items doesn’t fit in that fixed width because the text is too long?
Easily create an image without taking care of loaders and URLRequest etc.
Class to work/calculate with colors. You can easily abstract the red, green or blue values from a color.
Today I created a googlecode account. Now I can easily share code with you guys. 🙂