Do you use AS2.0 or AS3.0? I made one little game (not finished, though) with AS2.0 that you can find on my page, but I haven't found any nice tutorials to start with AS3.0..
I use AS2. I never had problem that I didn't solved with that. Except focus lost on flash. But thats a minor thing. I didn't see much AS3 beginner tutorials.
My biggest problem is that any key other than the arrow keys and the space bar need an other function than key.isDown(). And that function seems to keep the button pressed, really annoying.
I think it works like this in as3 too. while you press the key it is down. Make a counter for bullets for example. If counter is 3 don't create more bullets. If bullet is out of stage make the counter less, so another bullet can appear. I see this solution everywhere... I use this all the time. Even XNA works like this, and Xbox games made by that
Another problem occuring to me was to check whether the bullets hit a target. I pushed newly created enemy ships into a dynamic array and used a for..in loop in my missile class to check for a hit. Although the size of the array was bigger than 0 the loop was not even iterated once..
For arrays like this I use: for(element in array){ element._x = element._y = element.whatever-you-want-to-do }
It go through on full array you don't even have to know the size of it. AND this is one of the fastest loop for arrays, so the code is optimised. For example in this Ramen game the ramens move like this. element._y += speed
Great game dude
[link] This is a good tutorial for keys.
Another problem occuring to me was to check whether the bullets hit a target. I pushed newly created enemy ships into a dynamic array and used a for..in loop in my missile class to check for a hit. Although the size of the array was bigger than 0 the loop was not even iterated once..
for(element in array){
array[element]._x =
array[element]._y =
array[element].whatever-you-want-to-do
}
This is the proper one.
for(element in array){
element._x =
element._y =
element.whatever-you-want-to-do
}
It go through on full array you don't even have to know the size of it. AND this is one of the fastest loop for arrays, so the code is optimised. For example in this Ramen game the ramens move like this. element._y += speed