"Reprint" Insert SWF file in HTML (GO)

Source: Internet
Author: User

Inserting a SWF file in HTML (GO)

In the Web page to insert the SWF, no ordinary, usually think of the following code:

HTML code

<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ shockwave/cabs/flash/swflash.cab#version=6,0,29,0 " Width=" " height=" >           <param Name= "movie" value= "filename.swf" >          <param name= "wmode" value= "Transparent" >           <embed src= " filename.swf "width=" "height=" "type=" Application/x-shockwave-flash "/>"  

which

<embed src= "filename.swf" width= "height="type

is to adapt to Firefox under the normal play to add to the

Sometimes under IE, with the first paragraph of code will be some inexplicable format problems.

--------------------------------------------------------------------------------------------------------------- -----------------------------

Now with the swfobject, everything is easy.
One, the most common format, simple to insert a SWF

<script type= "Text/javascript" src= "swfobject.js" ></script>  <script type= "Text/javascript" >    swfobject.embedswf ("test.swf", "FileID", "N", "a", "9.0.0", "expressinstall.swf");   </script>    <body>  <div id= "FileID"/>  

The address of the parameter is in turn:
1, the SWF file address;
2. The ID of the container (such as DIV) used to load the SWF file;
3, the width of flash;
4, the height of flash;
5, the normal playback of the minimum required version of the Flash;
6, when the version is below the requirements, execute the SWF file, here to use this flash jump to the official download the latest version of the Flash plugin. (This parameter can be omitted)

Second, to the SWF pass parameters, variables and so on.

 <script src= "swfobject.js" type= "Text/javascript" ></script> <script type= "Text/javascript" >       var  flashvars = ";   var  params = {menu:  "false"  "Noscale"  "true"  always ",       bgcolor:  "#FFFFFF" };        var  attributes = {id: "FileID" }; swfobject.embedSWF ( "filename.swf", "Altcontent", "100%", "100%", "9.0.0", "expressinstall.swf", Flashvars, PA   Rams, attributes); </script> <body> <div id= "FileID"/> </body> 

In general, the first type is used more often.

"Reprint" Insert SWF file in HTML (GO)

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.