The netizen said that the full-screen display code in felx2 could not be used, because there is no flash. display. stagedisplaystate in flex3,
In fact, you only need to make some modifications.
Fullscree. mxml code
<? XML version = "1.0" encoding = "UTF-8"?>
<Mx: Application xmlns: MX ="Http://www.adobe.com/2006/mxml"
Backgroundgradientcolors = "[# 8080ff, #400040]">
<Mx: SCRIPT>
<! [CDATA [
Import flash. display. stage;
Private function toggle (): void {
If (FS. Selected = true ){
This. gofullscreen ();
} Else {
This. exitfullscreen ();
}
}
Private function gofullscreen (): void {
Stage. displaystate = 'fullscreen ';
}
Private function exitfullscreen (): void {
Stage. displaystate = 'normal ';
}
]>
</MX: SCRIPT>
<Mx: panel width = "100%" Height = "100%" Title = "enable full screen"
Layout = "absolute">
<Mx: checkbox label = "full screen" id = "FS" Click = "This. Toggle ()"
Horizontalcenter = "0" verticalcenter = "0"/>
</MX: Panel>
</MX: Application>
Index.template.html code (in the HTML-template folder)
<! -- Save from url = (0014) about: Internet -->
<HTML lang = "en">
<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>
<! -- Begin deeplinking required section -->
<LINK rel = "stylesheet" type = "text/CSS" href = "deeplinking/deeplinking.css"/>
<! -- End deeplinking required section -->
<Title >$ {Title} </title>
<SCRIPT src = "ac_oetags.js" Language = "JavaScript"> </SCRIPT>
<! -- Begin deeplinking required section -->
<SCRIPT src = "deeplinking/deeplinking. js" Language = "JavaScript"> </SCRIPT>
<! -- End deeplinking required section -->
<Style>
Body {margin: 0px; overflow: hidden}
</Style>
<Script language = "JavaScript" type = "text/JavaScript">
<! --
//-----------------------------------------------------------------------------
// Globals
// Major version of Flash required
VaR requiredmajorversion =$ {version_major };
// Minor version of Flash required
VaR requiredminorversion =$ {version_minor };
// Minor version of Flash required
VaR requiredrevision =$ {version_revision };
//-----------------------------------------------------------------------------
// -->
</SCRIPT>
</Head>
<Body scroll = "no">
<Script language = "JavaScript" type = "text/JavaScript">
<! --
// Version check for the flash player that has the ability to start player product install (6.0r65)
VaR hasproductinstall = detectflashver (6, 0, 65 );
// Version check based upon the values defined in globals
VaR hasrequestedversion = detectflashver (requiredmajorversion, requiredminorversion, requiredrevision );
// Check to see if a player with Flash product install is available and the version does not meet the requirements for playback
If (hasproductinstall &&! Hasrequestedversion ){
// Mmdoctitle is the stored document. Title value used by the installation process to close the window that started the process
// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
// Do not modify the following four lines
// Location visited after installation is complete if installation is required
VaR mmplayertype = (isie = true )? "ActiveX": "plugin ";
VaR mmredirecturl = Window. location;
Document. Title = Document. Title. Slice (0, 47) + "-Flash Player installation ";
VaR mmdoctitle = Document. title;
Ac_fl_runcontent (
"Src", "playerproductinstall ",
"Flashvars", "mmredirecturl =" + mmredirecturl + '& mmplayertype =' + mmplayertype + '& mmdoctitle =' + mmdoctitle + "",
"Width", "$ {width }",
"Height", "$ {height }",
"Align", "Middle ",
"ID", "$ {application }",
"Quality", "high ",
"Bgcolor", "$ {bgcolor }",
"Name", "$ {application }",
"AllowScriptAccess", "samedomain ",
"Allowfullscreen", "true ",
"Type", "application/X-Shockwave-flash ",
"Pluginspage ","Http://www.adobe.com/go/getflashplayer"
);
} Else if (hasrequestedversion ){
// If we 've detected an acceptable version
// Embed the Flash content SWF when all tests are passed
Ac_fl_runcontent (
"Src", "$ {SWF }",
"Width", "$ {width }",
"Height", "$ {height }",
"Align", "Middle ",
"ID", "$ {application }",
"Quality", "high ",
"Bgcolor", "$ {bgcolor }",
"Name", "$ {application }",
"AllowScriptAccess", "samedomain ",
"Allowfullscreen", "true ",
"Type", "application/X-Shockwave-flash ",
"Pluginspage ","Http://www.adobe.com/go/getflashplayer"
);
} Else {// flash is too old or we can't detect the plugin
VaR alternatecontent = 'alternate HTML content shoshould be placed here .'
+ 'This content requires the Adobe Flash Player .'
+ '<A href = http://www.adobe.com/go/getflash/> get flash </a> ';
Document. Write (alternatecontent); // insert non-Flash Content
}
// -->
</SCRIPT>
<NoScript>
<Object classid = "CLSID: D27CDB6E-AE6D-11cf-96B8-444553540000"
Id = "$ {application}" width = "$ {width}" Height = "$ {height }"
Codebase ="Http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<Param name = "movie" value = "commandid swf=.swf"/>
<Param name = "quality" value = "high"/>
<Param name = "bgcolor" value = "$ {bgcolor}"/>
<Param name = "allowScriptAccess" value = "samedomain"/>
<Embed src = "canonical fig .swf" Quality = "high" bgcolor = "$ {bgcolor }"
Width = "$ {width}" Height = "$ {height}" name = "$ {application}" align = "Middle"
Play = "true"
Loop = "false"
Quality = "high"
AllowScriptAccess = "samedomain"
Allowfullscreen = "true"
Type = "application/X-Shockwave-flash"
Pluginspage ="Http://www.adobe.com/go/getflashplayer">
</Embed>
</Object>
</NoScript>
</Body>
</Html>