纳金网
标题:
与JavaScript 通信
[打印本页]
作者:
铁锹
时间:
2012-8-26 10:05
标题:
与JavaScript 通信
代码:
<script type="text/javascript" language="javascript">
function***n_timer()
{
var x = Math.floor(Math.random()*21);
var y = Math.floor(Math.random()*21);
var z = Math.floor(Math.random()*21);
var cmd = "(SetObjectLocation #Teapot# "+x+" "+y+" "+z+")"; //Teapot 模型的名字
EspViewer.SendAPICommand(cmd);
setTimeout("***n_timer()", 200);
}
function init()
{
setTimeout("***n_timer()", 3500);
}
</script>
——————————————————————————
Version: 3.7
Running As: ActiveX Webpage
利用JavaScript 控制模型的坐标
说明:
The 'SendAPICommand' function is used to send Lisp/CScript commands to the Esperient Creator Viewer ActiveX control from .html pages
欢迎光临 纳金网 (http://go.narkii.com/club/)
Powered by Discuz! X2.5