flash和javascript信息交互_flash教程

2008-04-03 01:44:31来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

网上提供的这方面资料太少了,研究一两天,做了个例子,大家能够参考!


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Flash和3D信息交互</title>
<style type="text/css">
<!--
td {}{
font-family: "宋体";
font-size: 12px;
}
-->
</style>
</head>
<body onLoad="Init();">
<p>
<!--定义TerraExplorer的信息窗口对象-->
<object ID="TEInformationWindow" classid="CLSID:3a4f9193-65a8-11d5-85c1-0001023952c1" width="300" height="400"></object>
<!--定义一个TerraExplorer 3D窗口对象-->
<object ID="TE3DWindow" classid="CLSID:3a4f9192-65a8-11d5-85c1-0001023952c1" width=650 height="400"></object>
<!--定义TerraExplorer对象-->
<object ID="TE" CLASSId="CLSID:3a4f9191-65a8-11d5-85c1-0001023952c1"></object>
</p>

<table width="937" border="1" align="left">
<tr>
<td width="369" align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="150" id="Flash1" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="f2.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="http://www.knowsky.com/f2.swf" quality="high" bgcolor="#ffffff" width="300" height="150" name="Flash1" swLiveConnect="true" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<!-- -->
<td width="282" align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="300" height="150" id="myFlash" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="f4.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ccffff" />
<embed src="http://www.knowsky.com/f4.swf" quality="high" bgcolor="#ccffff" width="300" height="150" name="myFlash" swLiveConnect="true" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<td width="264" colspan="2" align="left">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="btn1" width="100" height="50" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="btn1.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="http://www.knowsky.com/btn1.swf" quality="high" bgcolor="#ffffff" width="100" height="50" swLiveConnect=true id="btn1" name="btn1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
</tr>
<tr>
<td width="369" height="200" align="center">
</td></tr>
</table>
</html>
<script language="JavaScript">

var ITerraExplorer = null;
var IPlane = null;
var IMenu = null;
var IObjectManager = null;
var IRender=null;
var ZoomMode = 0;
var zoom_array = new Array();
//浏览器配置
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

//初始化
function Init()
{
var temp;
ITerraExplorer = TE.interface("ITerraExplorer5");
IPlane = TE.interface("IPlane5");
IInformationTree = TE.interface("IInformationTree5");
IMenu = TE.interface("IMenu");
IObjectManager = TE.interface("IObjectManager5");
ITerraExplorer.Load("2.fly");
IRender=TE.interface("IRender5");
}
//飞到某个地方--------------------------------------------------------------------------------------------------
// 处理 Flash 影片中的任何 FSCommand 消息
function myFlash_DoFSCommand(args1,args2)
{
var myFlashObj = InternetExplorer ? myFlash : document.myFlash;
var tX0,tZ0;
tX0 =args1;
tZ0 =args2;
FlyToWhere(tX0,tZ0);
}
// Internet Explorer 的挂钩
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇: flash绘中秋贺卡:快乐月饼大游行_flash教程

下一篇: 把按钮藏起来 谈制作flash课件时的隐形处理_flash教程