我知道在actionscript 3.0中有可能,但我无法确定使用哪种方法。就像我按下左箭头键一样,闪光灯上的物体会将图像从圆形变为正方形。类似的东西......我试着谷歌这个,但我真的找不到答案甚至是一个例子。
我只看到此网站包含AS3 http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/KeyboardEvent.html#
中的键盘事件任何人都可以帮我解决这个问题。感谢
答案 0 :(得分:0)
Listen KeyboardEvent代码示例:
import flash.events.KeyboardEvent;
stage.addEventListener(KeyboardEvent.KEY_UP, onKeyboard);
function onKeyboard(event:KeyboardEvent):void
{
var char:String = String.fromCharCode(event.charCode);
trace("ker pressed: ", char);
}