In general, flex full screen refers to the full screen of the entire stage, rather than the full screen of the undetermined components. Online examples also refer to this situation.
The following is the current code of the specific component in full screen mode:
<? XML version = "1.0" encoding = "UTF-8"?> <Br/> <mx: Application xmlns: MX = "http://www.adobe.com/2006/mxml" layout = "absolute"> <br/> <mx: titlewindow x = "113" Y = "62" width = "337" Height = "263" layout = "absolute" id = "titletest" Title = "single control full screen test"> <br/> <mx: videodisplay x = "0" Y = "53" Height = "160" width = "317" id = "videodisplay"/> <br/> <mx: button x = "134.5" Y = "98" label = "full screen" id = "btnfullscreen" Click = "fullscreen (); "color =" # f41131 "/> <br/> <mx: button x =" 134. 5 "Y =" 10 "label =" full screen "id =" btnfullscreen0 "Click =" fullscreen (); "color =" # f41131 "/> <br/> </MX: titlewindow> <br/> <mx: SCRIPT> <br/> <! -- [CDATA [<br/> // <br/> Import COM. util. fullscreen. fullscreenutil; <br/> private function fullscreen (): void {<br/> If (fullscreenutil. isfullscreen) {<br/> btnfullscreen. label = 'full screen! '; <Br/> fullscreenutil. exitfullscreen (); <br/>}else {<br/> btnfullscreen. Label =' exit full screen! '; <Br/> fullscreenutil. gofullscreen (); </P> <p> // Add the object to be full screen. videodisplay <br/> fullscreenutil. addchild (videodisplay, true); </P> <p> // put btnfullscreen on the full screen. <br/> fullscreenutil. addchild (btnfullscreen, true, true, false,-1,-1,-1,100 ); <br/>}< br/>] --> <br/> </MX: SCRIPT> <br/> </MX: Application>
The following operations are full-screen classes:
Please download here:
Http://download.csdn.net/source/1679251
Modify the HTML module File as follows:
<! -- Saved from url = (0014) about: Internet --> <br/> <HTML lang = "en"> </P> <p> <! -- <Br/> smart developers always view source. </P> <p> This application was built using Adobe Flex, an open source framework <br/> for building rich Internet applications that get delivered via the <br/> Flash Player or to release tops via Adobe AIR. </P> <p> learn more about flex at http://flex.org <br/> // --> </P> <p> <pead> <br/> <meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8 "/> </P> <p> <! -- Begin browser history required section --> <br/> <LINK rel = "stylesheet" type = "text/CSS" href = "History/history.css" mce_href = "History/history.css" /> <br/> <! -- End browser history required section --> </P> <p> <title >$ {Title} </title> <br/> <MCE: script src = "ac_oetags.js" mce_src = "ac_oetags.js" Language = "JavaScript"> </MCE: SCRIPT> </P> <p> <! -- Begin browser history required section --> <br/> <MCE: script src = "History/history. JS "mce_src =" History/history. JS "Language =" JavaScript "> </MCE: SCRIPT> <br/> <! -- End browser history required section --> </P> <p> <MCE: style> <! -- <Br/> body {margin: 0px; overflow: hidden} <br/> --> </MCE: style> <style mce_bogus = "1"> body {margin: 0px; overflow: hidden }</style> <br/> <MCE: script language = "JavaScript" type = "text/JavaScript"> <! -- <Br/> // logs <br/> // globals <br/> // major version of Flash required <br/> var requiredmajorversion =$ {version_major }; <br/> // minor version of Flash required <br/> var requiredminorversion =$ {version_minor }; <br/> // minor version of Flash required <br/> var requiredrevision =$ {version_revision}; <br/> //------------------- ---------------------------------------------------------- <Br/> // --> </MCE: SCRIPT> <br/> </pead> </P> <p> <body scroll = "no"> <br/> <MCE: script Language = "JavaScript" type = "text/JavaScript"> <! -- <Br/> // version check for the flash player that has the ability to start player product install (6.0r65) <br/> var hasproductinstall = detectflashver (6, 0, 65); </P> <p> // version check based upon the values defined in globals <br/> var hasrequestedversion = detectflashver (requiredmajorversion, requiredminorversion, requiredrevision ); </P> <p> If (hasproductinstall &&! Hasrequestedversion) {<br/> // do not modify the following four lines <br/> // location visited after installation is complete if installation is required <br/> var mmplayertype = (isie = = true )? "ActiveX": "plugin"; <br/> var mmredirecturl = Window. location; <br/> document. title = document. title. slice (0, 47) + "-Flash Player installation"; <br/> var mmdoctitle = document. title; </P> <p> ac_fl_runcontent (<br/> "src", "playerproductinstall", <br/> "flashvars ", "mmredirecturl =" + mmredirecturl + '& mmplayertype =' + mmplayertype + '& mmdoctitle =' + mmdoctitle + "", <br/> "width ", "$ {width}", <br/> "height", "$ {Height} ", <br/>" align "," Middle ", <br/>" ID "," $ {application} ", <br/>" quality ", "high", <br/> "bgcolor", "$ {bgcolor}", <br/> "name", "$ {application }", <br/> "allowScriptAccess", "samedomain", <br/> "type", "application/X-Shockwave-flash", <br/> "pluginspage ", "http://www.adobe.com/go/getflashplayer" <br/>); <br/>} else if (hasrequestedversion) {<br/> // if we 've detected an acceptable version <br/> // em Bed the Flash content SWF when all tests are passed <br/> ac_fl_runcontent (<br/> "src", "$ {SWF}", <br/> "width ", "$ {width}", <br/> "height", "$ {height}", <br/> "align", "Middle ", <br/> "ID", "$ {application}", <br/> "quality", "high", <br/> "bgcolor ", "$ {bgcolor}", <br/> "name", "$ {application}", <br/> "allowScriptAccess", "samedomain ", <br/> "allowfullscreen", "true", // Add this line of code to allow full screen display! <Br/> "type", "application/X-Shockwave-flash", <br/> "pluginspage", "http://www.adobe.com/go/getflashplayer" <br/> ); <br/>} else {// flash is too old or we can't detect the plugin <br/> var alternatecontent = 'alternate HTML content shoshould be placed here. '<br/> +' This content requires the Adobe Flash Player. '<br/> +' <a href = "http://www.adobe.com/go/getflash" mce_href = "http://www.adobe.com/go /Getflash "> </a> get flash </a> '; <br/> document. write (alternatecontent); // insert non-Flash content <br/>}< br/> // --> </MCE: SCRIPT> <br/> <NoScript> <br/> <object classid = "CLSID: d27CDB6E-AE6D-11cf-96B8-444553540000 "<br/> id =" $ {application} "width =" $ {width} "Height =" $ {height} "<br/> codebase =" http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab "> <br/> <Param name = "movie" value = "$ {SWF}. SWF "/> <br/> <Param name =" quality "value =" high "/> <br/> <Param name =" bgcolor "value =" $ {bgcolor} "/> <br/> <Param name =" allowScriptAccess "value =" samedomain "/> <br/> <embed src =" registry.swf;.swf "mce_src =" registry.swf;.swf "Quality =" high "bgcolor =" $ {bgcolor} "<br/> width =" $ {width} "Height =" $ {height} "name =" $ {application} "align = "Middle" <br/> play = "true" <br/> loop = "false" <br/> Quality = "high" <br/> allowscriptacces S = "samedomain" <br/> allowfullscreen = "true" // Add this line of code to allow full screen display! <Br/> type = "application/X-Shockwave-flash" <br/> pluginspage = "http://www.adobe.com/go/getflashplayer"> <br/> </embed> <br/> </Object> <br/> </NoScript> <br/> </body> <br/> </ptml> <br/>