Basic SWFObject usage instance analysis, swfobject instance analysis

Source: Internet
Author: User

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.

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.