티스토리 뷰

펌 : http://www.cyworld.com/keis8_/7546253
 
private function fullscreenHandler():void { 
    // 밑에 EXACT_FIT 는 듀얼모니터 사용시 화면이 반쪽으로 나옴
    //systemManager.stage.scaleMode = StageScaleMode.EXACT_FIT;
    systemManager.stage.displayState = flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE;
}
 
width, height 값을 가능하면 백분율로 표시 하지 않고 픽셀단위로 설정하는 것이 좋다.
x, y 값도 고정하는 것이 좋음
 
application-app.xml
// 시스템 크롬 숨기기 - 창 이동, 창 닫기, 최소화, 최대화 버튼은 필요할 경우 직접 구현 하는것이 좋다.
< systemChrome>none</systemChrome>
// x, y
< x>0</x>
< y>0</y>
// 풀스크린 값
<fullScreen>true</fullScreen>
 
----------------------------------------------------------------------------------------------------------------------------------------------------
펌 : http://blog.chanik.com/48
 
ESC를 눌러도 FullScreen 상태를 빠져 나가지 않도록 구현 ( AIR 1.5.2 버전부터 가능 )
 
import flash.display.StageDisplayState;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
 
private function initHandler():void {
    // 밑에 EXACT_FIT 는 듀얼모니터 사용시 화면이 반쪽으로 나옴
    //systemManager.stage.scaleMode = StageScaleMode.EXACT_FIT;
    systemManager.stage.displayState = flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE;
    // ESC 체크 FullScreen 빠져나가지 않게 하기
    systemManager.stage.addEventListener(KeyboardEvent.KEY_DOWN, stageKeyDownHandler);
}
 
//----------------------------------------------------------------------------------------------------
// ESC 눌렀을 때 FullScreen 빠져나가지 않게 하기 시작
private function stageKeyDownHandler(event:KeyboardEvent):void {
    if(event.keyCode == Keyboard.ESCAPE) {
        event.preventDefault();
    }
}
// ESC 눌렀을 때 FullScreen 빠져나가지 않게 하기 끝
//----------------------------------------------------------------------------------------------------
 
WindowedApplication 에서 발생하는 keyDown 이벤트를 핸들링 할 수도 있으나, 상황에 따라
WindowedApplication 에서는 이벤트가 발생하지 않을 수도 있으므로, 위와 같이 Stage 에 붙여서 사용하는 것이 안정적이다. 

Total
Today
Yesterday
최근에 올라온 글
«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31