How to publish Flash .exe and .app files for fullscreen viewing
The following article assumes you have a solid understanding of Flash AS2 and the Flash interface and skips all basic Flash setup instructions and explanations in effort to provide you with quick, concise information.
You’ll occasionally find your client asking you for an executable version of the application you built them. Chances are they’ll also want that executable to open fullscreen. Flash can quickly compile executable files for Windows and Mac environments.
Step 1: Adding Some ActionScript
In the actions layer of your application, specify the following (place it at the top, underneath your class import statements, for consistency and best practice):
AS2:
-
// prevents resizing regardless of HTML embed code settings
-
Stage.scaleMode = "noScale";
-
-
// align the .swf to Top Left
-
Stage.align = "tl";
-
-
// call fscommand from flash
-
fscommand("fullscreen", "true");
-
fscommand("allowscale", "false");
AS3:
-
// import flash classes
-
import flash.display.*;
-
-
// prevents resizing regardless of HTML embed code settings
-
stage.displayState = StageDisplayState.FULL_SCREEN;
-
stage.scaleMode = StageScaleMode.NO_SCALE;
-
stage.align = StageAlign.TOP_LEFT;
-
-
// call fscommand from flash
-
fscommand("fullscreen", "true");
-
fscommand("allowscale", "false");
Detailed information about fscommand() and its additional parameters is beyond the scope of this article.
Step 2: Publish Settings (AS2 and AS3)
In the Formats tab in Flash’s publish settings (File > Publish Settings), you’ll see a bunch of options. The last two checkboxes allow you to export a .exe (Windows) or .app (Mac) version of your application.
If you just need to provide a .exe, you’re all done with the export step and you can skip to Step 4. If you’re providing a .app version instead/in addition, move on to the next tricky step…
Step 3: View Package Contents of .app File (Mac Executables Only, AS2 and AS3)
Now that you’ve published out your .app file, locate it in the publish directory you’ve specified in the Publish Settings panel. This file will launch to fit your monitor’s window, however with uncertain inconsistency and most likely with a browser title bar. No problem, here’s the fix:
- Right click on the .app file and choose Show Package Contents
- Locate the Info.plist file and open it in TextEditor or a similar editor
- Browse towards the end and locate the end of the
<array></array>node - Add the following node, alphabetically, as an additional
<key>node: - Save your file
- Now test your app
<key>CSResourcesFileMapped</key><true/><key>LSPrefersCarbon</key><string>YES</string>
<key>CSResourcesFileMapped</key> <true/> <key>LSPrefersCarbon</key>
<string>YES</string>
<key>LSUIPresentationMode</key>
<integer>4</integer>
<key>NSAppleScriptEnabled</key><string>YES</string><key>NSHumanReadableCopyright</key><string>Copyright 1996-2009 Adobe Systems Incorporated and its licensors. All Rights Reserved.</string>
Note that your XML list may differ from the example above. As long as you drop the <key>LSUIPresentationMode</key> node above in the right alphabetical order, it will yield the desired results.
Step 4: Packaging your files for delivery
Now that your executable files are ready for delivery for either platform, it’s time to package them up and get them ready for hand-off.
Create a new folder to house your .exe and/or .app files. These files act like a .swf, so don’t forget to include all external-loading files (XML, folders, images, etc.) in your delivery package. You’re all set.


