[url]http://uh.9ria.com/space-12147-do-blog-id-590.html[/url]
use namespace mx_internal;
private function keyHandler(event:KeyboardEvent):void{
(dataGrid.rendererArray[dataGrid.selectedIndex+1][2] as RadioListCanvas).button.dispatchEvent(new MouseEvent(MouseEvent.CLICK))
}
use namespace mx_internal;
private function keyHandler(event:KeyboardEvent):void{
(dataGrid.rendererArray[dataGrid.selectedIndex+1][2] as RadioListCanvas).button.dispatchEvent(new MouseEvent(MouseEvent.CLICK))
}
本文介绍了一种使用Flash AS3处理键盘事件的方法,通过内部私有函数keyHandler实现对特定UI元素的操作。该方法能够捕获键盘事件,并触发对应按钮的点击事件。

被折叠的 条评论
为什么被折叠?



