0

I have no problem with my app when I run it ctrl+enter or when I only open the .swf file, but once I open the HTML file and go into fullscreen mode, for some reason, I can't type into the text fields that are input any more. What's weirdest is that while the Space key still works, the Shift key doesn't.

Here's some code parts:

stage.scaleMode=StageScaleMode.SHOW_ALL;
stage.addEventListener(MouseEvent.CLICK,fullScreen);
stage.addEventListener(KeyboardEvent.KEY_UP,keys);
...
function keys(e:KeyboardEvent):void{
switch(e.keyCode){
    case Keyboard.SHIFT:
        popup.popupText.text=popupResult();
        popup.visible=!popup.visible;
    break;
    case Keyboard.SPACE:
        switch(stav){
            case 0:
                stav=1;
                var date:Date=new Date();
                startTime=date.getTime();
                zarovkaA.play();
                horakB.play();
                timer.start();
            break;
            case 2:
                stav=3;

                counter.visible=false;
                leftIn.visible=false;
                rightIn.visible=false;
                inBg.visible=false;

                leftOut.visible=true;
                rightOut.visible=true;
                centropol.visible=true;

                leftOut.text=getResult(leftIn.text);
                rightOut.text=getResult(rightIn.text);

                centropol.text="s CENTROPOL ENERGY\njsi na svícení ušetřil\n";
                            /*+(calToKc(parseInt(leftIn.text))+
                              calToKc(parseInt(rightIn.text)))
                            +" Kč/rok";*/
                calSum+=parseInt(leftIn.text)+parseInt(rightIn.text);
            break;
            case 3:
                stav=0;
                counter.visible=true;
                counter.text=format(maxTime);

                inBg.visible=false;

                leftIn.visible=false;
                rightIn.visible=false;
                leftOut.visible=false;
                rightOut.visible=false;

                rightIn.text="";
                leftIn.text="";

                centropol.visible=false;
            break;
        }
    break;
}
}
...
function fullScreen(e:MouseEvent):void{
stage.displayState=StageDisplayState.FULL_SCREEN;
}
4

1 回答 1

1

您需要使用 StageDisplayState.FULLSCREEN 而不是 StageDisplayState.FULLSCREEN_INTERACTIVE,它会给您一个弹出窗口以允许或不输入 swf,这是用户允许或不允许的。

请注意,这只适用于 Flash Player 11.1 或更高版本。还是11.3?无论如何,总是在最后一个或最后一个 Flash 播放器中编译(为了安全、性能和稳定性)。

于 2013-06-28T13:03:13.577 回答