为什么一定要加这句话呢:stage.focus = stage(AS3)原代码:// give stage back the keyboard focusstage.focus = stage; 如果把这句话删掉,当在swf里点击完对话框后再按键盘就不起作用.可是为什么会不起作用

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 08:23:53
为什么一定要加这句话呢:stage.focus = stage(AS3)原代码:// give stage back the keyboard focusstage.focus = stage; 如果把这句话删掉,当在swf里点击完对话框后再按键盘就不起作用.可是为什么会不起作用

为什么一定要加这句话呢:stage.focus = stage(AS3)原代码:// give stage back the keyboard focusstage.focus = stage; 如果把这句话删掉,当在swf里点击完对话框后再按键盘就不起作用.可是为什么会不起作用
为什么一定要加这句话呢:stage.focus = stage(AS3)
原代码:
// give stage back the keyboard focus
stage.focus = stage;
如果把这句话删掉,当在swf里点击完对话框后再按键盘就不起作用.可是为什么会不起作用呢,为什么一定要加这句话呢 -

为什么一定要加这句话呢:stage.focus = stage(AS3)原代码:// give stage back the keyboard focusstage.focus = stage; 如果把这句话删掉,当在swf里点击完对话框后再按键盘就不起作用.可是为什么会不起作用
addEventListener(Event.ENTER_FRAME,onEnterFrame_func);

function onEnterFrame_func(_evt:Event):void{
trace(stage.focus);
}


测试一下上段代码吧,应该是对话框removeChild后,因为stage.focus指向的对象失效,令到键盘失效所致,所以一般通用解决方案就是在移除前把键盘焦点赋值给stage(未removeChild前,DisplayObject的root、stage、parent三值都不为null)

为什么一定要加这句话呢:stage.focus = stage(AS3)原代码:// give stage back the keyboard focusstage.focus = stage; 如果把这句话删掉,当在swf里点击完对话框后再按键盘就不起作用.可是为什么会不起作用 英语语法:请问数字后面跟名词的话,名词要加复数s吗?比如这句话:8 stage of Development,当中的stage要不要加s? the men and women为什么前面要加the?All the world`s a stage ,if all the men and women not actors ……比如这句话,为什么要加the呢?难道是特指?这是the的什么用法? 请问这句话怎么翻译?Dynamics of the swing stage 英语:at a later stage /in the early stage 为什么一个是at 一个又是in呢?=.= let is go为什么要加is这句话不是现在进行时啊、、、为什么要加IS呢? 疑问词加不定式I dont't know how to do it.一定要加it吗?为什么?这句话是宾语从句吗? At the beginning of the play,the entire cast dances manically across the stage.请问这句话中dance是不是不及物动词呢? 为什么食盐中加碘一定要加碘酸钾?碘酸钠呢?碘化钾和碘化钠呢? Visiting a friend中,visit为什么要加ing呢?这句话做的题目 You need’t be so rude about it.这句话里为什么要加be呢? It must be terrible to be grown up!这句话里为什么要加be呢? my nose hurts 这句话中hurt为什么加s呢? I visited museum and sat in public gardens.这句话里面为什么要加sat呢? Introduction to Workload Analysis.这句话为什么要加to呢? Observe means to find out information.请问这句话是什么结构?为什么要加to呢? The world is against me这句话中为什么要加IS呢 It is unusual for him to be late.这句话里为什么要加be呢?