flash和javascript信息交互_flash教程(2)
2008-04-03 01:44:31来源:互联网 阅读 ()
navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1)
{
document.write(<SCRIPT LANGUAGE=VBScript\> \n);
document.write(on error resume next \n);
document.write(Sub myFlash_FSCommand(ByVal command, ByVal args)\n);
document.write( call myFlash_DoFSCommand(command, args)\n);
document.write(end sub\n);
document.write(</SCRIPT\> \n);
}
function FlyToWhere(tX0,tZ0)
{
//创建文本对象
var LabelInfo = new Object();
LabelInfo.Text = "经度 : " tX0 " 纬度 : " tZ0;
LabelInfo.Scale = 1;
LabelInfo.BgColor = 236;
IObjectManager.CreateLabel (LabelInfo, tX0, tZ0, 2000.0 );
IPlane.FlyTo (tX0,tZ0,2000.0,117.98,0, -35,"Oval" );
}
//飞到某地------------------------------------------------------------------------------------------------------
function btn1_DoFSCommand(command, args) {
var btn1Obj = InternetExplorer ? document.all.btn1 : document.btn1;
var tX0;
tX0 =args;
klmy();
}
// Internet Explorer 的挂钩
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1)
{
document.write(<script language=\"VBScript\"\>\n);
document.write(On Error Resume Next\n);
document.write(Sub btn1_FSCommand(ByVal command, ByVal args)\n);
document.write( Call btn1_DoFSCommand(command, args)\n);
document.write(End Sub\n);
document.write(</script\>\n);
}
function klmy()
{
//创建文本对象
var LabelInfo = new Object();
LabelInfo.Text = "中国 "
LabelInfo.Scale = 1;
LabelInfo.BgColor = 236;
IObjectManager.CreateLabel (LabelInfo, 87, 45, 2000.0 );
IPlane.FlyTo (87,45,2000.0,117.98,0, -35,"Oval" );
}
//-------------------------------------------------------------------------------------------------------------------
</script>
<script language="vbscript">
function TE_OnFrame()
dim x1,y1
IRender.GetMouseInfo 1,x1,y1
ObjType = 0
IRender.ScreenToWorld x1,y1,ObjType,WorldX,WorldHeigth,WorldY,ObjectID
window.document.Flash1.SetVariable "x", WorldX
window.document.Flash1.SetVariable "y", WorldY
end function
</script>
http://www.cnblogs.com/support/archive/2006/11/28/575473.html
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash
