1 | 43 | (1장 섹션6 (43페이지)) package { import flash.display.Sprite; import flash.events.KeyboardEvent; public class ExampleApplication extends Sprite { public function ExampleApplication() { stage.focus = this; stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown); // stage.가 앞에 붙어야함 } private function onKeyDown(event:KeyboardEvent):void { trace("key down: " + event.charCode); } } } | 2008-09-24 | 2 |