Four ways to achieve full-screen effects of animated SWF files

Source: Internet
Author: User
Tags html page window blank page

How do I make a swf file Full-screen?

The first method:
The browser menu bar and the full screen of the toolbar are not displayed. This full screen is slightly more complex and is not related to flash settings, but to borrow
Help JavaScript to complete. To do this, add the following code to

<script language= "JavaScript" >
<!-- ("nfd.swf", "" "," fullscreen=1,menubar=no,width=100%,height=100% ")

The second method:
You can also add the Geturl command on the first frame of the SWF file: ("nfd.swf", "" "," fullscreen=1,menubar=no,width=800,height=600 ")

This full-screen screen is also similar to a screensaver, using the Alt+f4 or Settings button to exit. Set the Fullscreen to = 0, just do not show browser dishes
A full screen of a single bar and toolbar.
There is also a wording: ("*.swf", "", "Menubar=no,
Toolbar=no,location=no,status=no,fullscreen=yes ")

I personally recommend this ^_^

The third method:
A little trouble, need two pages, hehe *-*
You can create a blank page plus code:

<script language= "JavaScript" > ("*.htm", "Newwin", "Fullscreen=yes,status=no,location=no,
Toolbar=no,directories=no,menubar=no,resizable=yes,scrollbars=no ");

*.htm you replace him with your own. You want to open a Full-screen page.

The fourth method:
This method is more detailed, there are steps, but I did not try, you can first try Ah.
I write down the procedure:
1, in the Flashk after the animation, first select the main menu file Publish settings (file Publishing set command), pop-up dialog box, click into the HTML entry settings: Set dimensions size units for percent percentage; in the wide, High school setting 100. Click the Publish button to publish. In this way, an HTML file with the same name as the animation will be generated at your original file.
2, create a blank HTML page blank.htm, only keep the 3, the establishment of a band with the framework of HTML file show.html, page HTML text is as follows:

<frameset rows= "100%,*" framespacing= "0" frameborder= "no" border= "0" >
<frame name= "Top" src= "animation name. html" frameborder= "0" border= "0"
Marginwidth= "0" marginheight= "0" leftmargin= "0" rightmargin= "0" topmargin= "0" >
<frame name= "blank" src= "blank.html" frameborder= "0" border= "0" marginwidth= "0"
marginheight= "0" leftmargin= "0" rightmargin= "0" topmargin= "0" >

The file divides the page into two frames, with the animated name. html file, below the blank.html file.
Note: The animated name. html file is the corresponding HTML file that is published in the first step.
4. Create an HTML file full.html with JavaScript script. Use this file to open show.html and
Define its display window as full screen, without menu, scroll bar, status bar, etc.
The HTML text for the file is as follows:

<script language= "JavaScript" > ("show.html", "Newwin", "Fullscreen=yes,status=no,location=no,toolbar=no,
Directories=no,menubar=no,resizable=yes,scrollbars=no ");

The fourth step above is the same as the third method.

How to achieve the effect of adding favorites and setting the home page in Flash
Q: How do I use ActionScript to set the page as the homepage and to add favorites?
A: First, use the Geturl method:

Set as homepage:
On (release) {
GetURL ("GetURL (" javascript:void (document.links[0].style.behavior= ' url (#default #homepage) '); void document.links[ 0].sethomepage (' http://your website address/'); "," _self "," POST "); }
Add to Favorites:
On (release) {
GetURL ("GetURL (" javascript:void window.external.AddFavorite (' http://your website address ', ' site name '); "," _self "," POST ");}

The second method is more complicated than the one above by using the Fscommand method. First add ActionScript script code to the Flash button

Set as homepage
On (release) {Fscommand ("setHomePage", "http://your website address");}
Join Favorites
On (release) {Fscommand ("Addfavorite", "http://Web address | site name");}

When you publish Flash animations, choose HTML, Flash with Fscommand in the template drop-down menu, publish HTML pages and then modify the published HTML page to find a paragraph in the HTML code

Handle all the "Fscommand messages in a Flash movie function Sethomepage_dofscommand (command, args) {}
This section is modified to//Handle all the "the" Fscommand messages in a
Flash movie function Sethomepage_dofscommand (command, args) {
var sethomepageobj = InternetExplorer? Sethomepage:document.sethomepage; if (Command = = "setHomePage") {
document.links[0].style.behavior = "url (#default #homepage)";
Document.links[0].sethomepage (args); else if (Command = = "Addfavorite")
{args = Args.split ("|"); window.external.AddFavorite (Args[0], args[1]);

Finally, if there is not a link in the HTML, you need to add a <a href= "javascript:" in front of the <script language=javascript> sentence. ></a>

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: 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.