I am new to Adobe Flash Action Script 3.0 but learning.
Geweer = the guy you are and kogel = bullet
I am having this code:
var geweer; .
stage.addEventListener(KeyboardEvent.KEY_DOWN,beweeg);
function beweeg(event:KeyboardEvent)
{
switch(event.keyCode)
{
case 38:
geweer.y = geweer.y -10;
kogel.y = kogel.y -10;
break;
case 40:
geweer.y = geweer.y +10;
kogel.y = kogel.y +10;
break;
case 32:
kogel.x = kogel.x +20;
break;
}
}
As you see. Case 32. When launched. The bullet will move from position only once(unless I press it multiple times). How can i make it to repeat(Without pressing multiple times)? And do it multiple times, to shoot multiple bullets.