Full-screen code of Flex full-screen Components

Source: Internet
Author: User

The following is the current code of the specific component in full screen mode: Copy codeThe Code is as follows: <? Xml version = "1.0" encoding = "UTF-8"?>
<Mx: Application xmlns: mx = "http://www.adobe.com/2006/mxml" layout = "absolute">
<Mx: titleWindow x = "113" y = "62" width = "337" height = "263" layout = "absolute" id = "titleTest" title = "single control full screen test">
<Mx: VideoDisplay x = "0" y = "53" height = "160" width = "317" id = "videoDisplay"/>
<Mx: buttons x = "134.5" y = "98" label = "full screen" id = "btnFullScreen" click = "fullScreen ();" color = "# F41131"/>
<Mx: buttons x = "134.5" y = "10" label = "full screen" id = "btnFullScreen0" click = "fullScreen ();" color = "# F41131"/>
</Mx: TitleWindow>
<Mx: Script>
<! -- [CDATA [
//
Import com. util. fullscreen. FullScreenUtil;
Private function fullScreen (): void {
If (FullScreenUtil. isFullScreen ){
BtnFullScreen. label = 'full screen! ';
FullScreenUtil. exitFullScreen ();
} Else {
BtnFullScreen. label = 'exit full screen! ';
FullScreenUtil. goFullScreen ();

// Add the object to full screen. videoDisplay
FullScreenUtil. addChild (videoDisplay, true );

// Put btnFullScreen on the Full Screen Object.
FullScreenUtil. addChild (btnFullScreen, true, true, false,-1,-1,-1,100 );
}
}
] -->
</Mx: Script>
</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:Copy codeThe Code is as follows: <! -- Save from url = (0014) about: internet -->
<Html lang = "en">

<! --
Smart developers always View Source.

This application was built using Adobe Flex, an open source framework
For building rich Internet applications that get delivered via
Flash Player or to your tops via Adobe AIR.

Learn more about Flex at http://flex.org
// -->

<Head>
<Meta http-equiv = "Content-Type" content = "text/html; charset = UTF-8"/>

<! -- BEGIN Browser History required section -->
<Link rel = "stylesheet" type = "text/css" href = "history/history.css" href = "history/history.css"/>
<! -- END Browser History required section -->

<Title >$ {title} </title>
<Script src = "AC_OETags.js" src = "AC_OETags.js" language = "javascript"> </script>

<! -- BEGIN Browser History required section -->
<Script src = "history/history. js" src = "history/history. js" language = "javascript"> </script>
<! -- END Browser History required section -->

<Style> <! --
Body {margin: 0px; overflow: hidden}
--> </Style> <style bogus = "1"> 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 );

If (hasProductInstall &&! HasRequestedVersion ){
// 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 ",
"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", // Add this line of code to allow full screen display!
"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" href = "http://www.adobe.com/go/getflash"> </a> 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 = "symbol swf0000.swf" src = "symbol swf0000.swf" quality = "high" bgcolor = "$ {bgcolor }"
Width = "$ {width}" height = "$ {height}" name = "$ {application}" align = "middle"
Play = "true"
Loop = "false"
Quality = "high"
AllowScriptAccess = "sameDomain"
AllowFullScreen = "true" // Add this line of code to allow full screen display!
Type = "application/x-shockwave-flash"
Pluginspage = "http://www.adobe.com/go/getflashplayer">
</Embed>
</Object>
</Noscript>
</Body>
</Html>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.