Creating FullScreen Flex/AIR/Flash Apllications

7 views
Skip to first unread message

vrathore

unread,
May 16, 2008, 5:42:23 AM5/16/08
to Delhi Flex User Group
Going Fullscreen in Actionscript

The main stage for the AIR application has a displayState property.
The framework also contains a class, StageDisplayState, that defines
three constants for the three different display states. By using these
classes you can put your AIR application into any of the three display
states .

PLAIN TEXTActionscript:
// Enter Fullscreen Interactive State
stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
or
// Enter Standard Fullscreen State
stage.displayState = StageDisplayState.FULL_SCREEN;
or
// Enter Normal State
stage.displayState = StageDisplayState.NORMAL;

we can use these as follows :-

<mx:Button label="Fullscreen Interactive" click="stage.displayState =
StageDisplayState.FULL_SCREEN_INTERACTIVE" />

<mx:Button label="Fullscreen" click="stage.displayState =
StageDisplayState.FULL_SCREEN" />

<mx:Button label="Standard View" click="stage.displayState =
StageDisplayState.NORMAL" />


Going Fullscreen through JavaScript

The logic works exactly the same in JavaScript as it does in
Actionscript, but the classpaths are different. You can see the
examples below in Code Example 2.

PLAIN TEXTJavaScript:
// Enter Fullscreen Interactive State
window.nativeWindow.stage.displayState =
runtime.flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE;
or
// Enter Standard Fullscreen State
window.nativeWindow.stage.displayState =
runtime.flash.display.StageDisplayState.FULL_SCREEN;
or
// Enter Normal State
window.nativeWindow.stage.displayState =
runtime.flash.display.StageDisplayState.NORMAL;


Cheers

Varun Rathore
Reply all
Reply to author
Forward
0 new messages