DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> WEB網站前端 >> 關於網頁技巧 >> 一個經典的符合web標准的flash插入法
一個經典的符合web標准的flash插入法
編輯:關於網頁技巧     
HTML 代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>FlashObject embed by Geoff Stearns (basic) @ deconcept</title>

<!-- FlashObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/flashobject/ -->

<script type="text/javascript" src="flashobject.js"></script>

</head>

<body>



 <script type="text/javascript">

  // <![CDATA[

  

  var fo = new FlashObject("fo_tester.swf", "fotester", "300", "300", "6", "#FF6600");

  fo.addVariable("flashVarText", "this is passed in via FlashVars for example only"); // this line is optional, but this example uses the variable and displays this text inside the flash movie

  fo.write("flashcontent");

  

  // ]]>

 </script>

</body>

</html>


flashobject.js:
代碼:
/**

 * FlashObject v1.3c: Flash detection and embed - http://blog.deconcept.com/flashobject/

 *

 * FlashObject is (c) 2006 Geoff Stearns and is released under the MIT License:

 * http://www.opensource.org/licenses/mit-license.php

 *

 */

if(typeof com == "undefined") var com = new Object();

if(typeof com.deconcept == "undefined") com.deconcept = new Object();

if(typeof com.deconcept.util == "undefined") com.deconcept.util = new Object();

if(typeof com.deconcept.FlashObjectUtil == "undefined") com.deconcept.FlashObjectUtil = new Object();

com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){

  if (!document.createElement || !document.getElementById) return;

  this.DETECT_KEY = detectKey ? detectKey : 'detectflash';

  this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY);

  this.params = new Object();

  this.variables = new Object();

  this.attributes = new Array();

  this.useExpressInstall = useExpressInstall;



  if(swf) this.setAttribute('swf', swf);

  i

1234下一頁
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved