Basic SWFObject usage instance analysis, swfobject instance analysis
This example describes the basic usage of SWFObject. Share it with you for your reference. The specific analysis is as follows:
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.
Basic usage:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Parameter definition:
<script type="text/javascript">var flashvars = { name1: "hello", name2: "world", name3: "foobar"};var params = { menu: "false"};var attributes = { id: "myDynamicContent", name: "myDynamicContent"};swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);</script>
Parameter Definition 2:
<script type="text/javascript">var flashvars = false;var params = {};var attributes = { id: "myDynamicContent", name: "myDynamicContent"};swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);</script>
I hope this article will help you design javascript programs.