전체 화면 윈도우 표시

Adobe AIR 1.0 이상

Stage의 displayState 속성을 StageDisplayState.FULL_SCREEN_INTERACTIVE 로 설정하면 윈도우가 전체 화면 모드로 전환되며 이 모드에서는 키보드 입력이 허용됩니다 . 브라우저에서 실행되는 SWF 내용에서는 키보드 입력이 허용되지 않습니다. 전체 화면 모드를 종료하려면 Esc 키를 누릅니다.

참고: 일부 Linux 윈도우 관리자에서는 윈도우의 최대 크기가 설정된 경우 화면을 채우도록 윈도우 크기가 변경되지 않습니다(윈도우 시스템 크롬은 제거되지 않음).

예를 들어 다음 Flex 코드에서는 간단한 전체 화면 터미널을 설정하는 간략한 AIR 응용 프로그램을 정의합니다.

<?xml version="1.0" encoding="utf-8"?> 
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"  
    layout="vertical"  
    applicationComplete="init()" backgroundColor="0x003030" focusRect="false"> 
    <mx:Script> 
        <![CDATA[ 
            private function init():void  
            { 
                stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; 
                focusManager.setFocus(terminal); 
                terminal.text = "Welcome to the dumb terminal app. Press the ESC key to exit..\n"; 
                terminal.selectionBeginIndex = terminal.text.length; 
                terminal.selectionEndIndex = terminal.text.length; 
            } 
        ]]> 
    </mx:Script> 
    <mx:TextArea  
        id="terminal"  
        height="100%" width="100%"  
        scroll="false" 
        backgroundColor="0x003030"  
        color="0xCCFF00"  
        fontFamily="Lucida Console"  
        fontSize="44"/> 
</mx:WindowedApplication>

아래의 Flash용 ActionScript 예제에서는 간단한 전체 화면 텍스트 터미널을 시뮬레이션합니다.

    import flash.display.Sprite; 
    import flash.display.StageDisplayState; 
    import flash.text.TextField; 
    import flash.text.TextFormat; 
     
    public class FullScreenTerminalExample extends Sprite 
    { 
        public function FullScreenTerminalExample():void  
        { 
            var terminal:TextField = new TextField(); 
            terminal.multiline = true; 
            terminal.wordWrap = true; 
            terminal.selectable = true; 
            terminal.background = true; 
            terminal.backgroundColor = 0x00333333; 
             
            this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; 
             
            addChild(terminal); 
            terminal.width = 550; 
            terminal.height = 400; 
             
            terminal.text = "Welcome to the dumb terminal application. Press the ESC key to exit.\n_"; 
             
            var tf:TextFormat = new TextFormat(); 
            tf.font = "Courier New"; 
            tf.color = 0x00CCFF00; 
            tf.size = 12; 
            terminal.setTextFormat(tf); 
             
            terminal.setSelection(terminal.text.length - 1, terminal.text.length); 
        } 
    }