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