Balon Klavye ile hareket ettirme.

  function hareket(islem:KeyboardEvent): void{ if(islem.keyCode==Keyboard.UP) { balon.y=balon.y-10; balon.width=balon.width-20; balon.height=balon.height-20; } else if(islem.keyCode==Keyboard.DOWN) { balon.y=balon.y+10; balon.width=balon.width+20; balon.height=balon.height+20; } else if(islem.keyCode==Keyboard.LEFT) { balon.x=balon.x-10; } else if(islem.keyCode==Keyboard.RIGHT) { balon.x=balon.x+10; } } stage.addEventListener(KeyboardEvent.KEY_DOWN,hareket);

Continue Reading