Swfobject: javascript-based Flash Media Version Detection and embedding Module

Source: Internet
Author: User

Part of the information in this article comes from.

Swfobject is an independent and agile JavaScript module used to insert Adobe Flash Media resources (*. SWF files) in HTML. The Javascript script in this module can automatically detect the support of Flash plug-ins by mainstream browsers on PCs and Mac machines. It makes inserting Flash Media resources as simple and secure as possible. In addition, it is very consistent with the search engine optimization principles. In addition, it can avoid non-standard tags such as object and embed in your HTML and XHTML, so as to conform to more standards.

Swfobject is currently widely used on major video websites, such as YouTube, Sina video, and six rooms (note: the six rooms use flashobject, which is actually swfobject. Due to Adobe's pressing "Flash" name, it was renamed. See here ).

When using swfobject, you must first include the swfobject. js file (nonsense), and then use the following method to create a swfobject instance:

VaRSo= NewSwfobject (SwF, ID, width, height, version, Background-Color [, quality, xiredirecturl, redirecturl, detectkey]);

Here is a simple example:

 1  <  Script  Type  = "Text/JavaScript"  SRC  = "Swfobject. js" > </  Script  >  
2
3 < Div ID = "Flashcontent" >
4 This text is replaced by the Flash Movie.
5 </ Div >
6
7 < Script Type = "Text/JavaScript" >
8 VaR So =   New Swfobject ( " Movie.swf " , " Mymovie " , " 200 " , " 100 " , " 7 " , " #336699 " );
9 So. Write ( " Flashcontent " );
10 </ Script >
11

Related Article

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.