Using SWFObject is straightforward. Merely add the swfobject.js Javascript file, and then adjoin a bit of Javascript in your page to include your swf. Here is an illustration showing the least amount of code required to include a swf:
Code:
<script type="text/javascript" src="swfobject.js"> </ script>
<div id="flashcon">
Remember to enable Javascript.
</ Div>
<script type="text/javascript">
swfobject.embedSWF ("http://www.abc.com/tool/swf/tool_v3.swf", "flashcon", "546", "265", "7");
</ Script>
Explanation of code
Include the file using swfobject.js
Code:
<script type="text/javascript" src="swfobject.js"> </ script>
Create a div tag which will be included in your swf:
Code:
<div id="flashcon"> Do not forget enable Javascript. </ div>
Allow this HTML element that contains your swf. Inside the content posted will be replaced by the swf, so users with the correct version of Flash Player will never see the content inside this element. This device also allows users to let the search engines reference a alternative content.
Bookmarks