JS不断给FLASH传值

发布时间:2013-3-28浏览:

核心提示:JS不断给FLASH传值

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta. http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script. type="text/javascript" src="swfobject.js" ></script>
</head>

<body nload="setInterval(callFlash,1000)">
<input type="button" id="showBtn" value="隐藏" nclick="showFlash()" />
<div id="flashcontent"></div>
</body>
<script>
var so=new SWFObject("fl.swf","flash","800","600","9");
so.write("flashcontent");

 function callFlash(){
  document.getElementById("flash").showTxt(Math.random());
 }
 function showFlash(){
  var _div=document.getElementById("flashcontent");
  var _txt=document.getElementById("showBtn");
  if(_div.style.display=="none"){
   _div.style.display="";
   _txt.value="隐藏";   
  }else{
   _div.style.display="none"
   _txt.value="显示";
  }
 }
</script>
</html>
 


 


前一篇:定做程序设计
后一篇:小破孩首款手机游戏跃居iphone应用排行第一名
分享到: