Showing posts with label full screen. Show all posts
Showing posts with label full screen. Show all posts

Saturday, June 13, 2009

Full Screen support in Flex

I recently learned that you can make your Flex application full screen. Here are the steps to accomplish it:

First edit your project's html-template/index.template.html file and add the following allowFullScreen property to the JavaScript code:
else if (hasRequestedVersion) {
  AC_FL_RunContent(
    ...
    "allowFullScreen","true",
    ...
);

You can also add the <param name="allowFullScreen" value="true"/> to the <object> tag, and allowFullScreen="true" to the <embed> tag for compatibility.

Next in your ActionScript code when the application has finished loading (when the stage isn't null) you can make your application full screen like this:
Application.application.stage.displayState = StageDisplayState.FULL_SCREEN;

I found this out from the The Adobe Flex 3 Programming ActionScript 3 PDF on page 547.