Specifications

335ADOBE FLEX 3
Building and Deploying Adobe Flex 3 Applications
Add Express Install support to your wrapper
1 Open your wrapper in a text editor.
2 Add or include the script in the index.template.html file to your wrapper. This file is included in the
/templates/express-installation directory. For a detailed description of this script, see
“Understanding the Express
Install script” on page 337.
3 In the Globals section of the script, set the minimum version of Flash Player that your users must be running.
For example:
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
If you are using Flex Builder to generate the wrapper, you can set this value in the Detect Flash Version text
box in the Compiler Properties dialog box.
This is useful, too, to ensure that your users have a version of Flash Player that supports certain features. For
example, if you want your users’ Flash Player to support signed framework RSLs, set the minimum version to
9.0.115.
4 Deploy the AC_OETags.js file to a location that is accessible to your wrapper. This file is included in the
/templates/express-installation directory. This file is also generated by Flex Builder. The default location is the
same directory as the wrapper. If you change it, you must also edit the following line in the wrapper:
<script src="AC_OETags.js" language="javascript"></script>
5 Edit the calls to the AC_FL_RunContent() method. This method passes information about the SWF file to be
run to the AC_OETags.js external script file. The functions defined in the AC_OETags.js file write the
<object>
and
<embed> tags for the SWF file.
There are multiple calls to this method in script blocks that meet different conditions. In the first script block,
change the
id and name parameters to match your SWF files name:
if (hasProductInstall && !hasRequestedVersion) {
AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+
MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "100%",
"height", "100%",
"align", "middle",
"id", "MyFirstProject",
"quality", "high",