Moderators: e_phoenix13
Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Member
Posted
Hi there,

What's wrong with my html/javascript codes?
I want to create a button and allow user type in a value which will be applied to a simple cube to change its opacity in vet scene.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="javascript" src="MTS3Interface.js"></script>
<script language="javascript">
<!--

var vmp; //This global variable is for the VET content

function changeopacity()
{
var value = document.getElementById('opc').value;
if (value !='')
{
vmp.ExecuteVETScript("MTSInstances.Cube.Opac="+value+";");
}
else alert("Invalid or blank size value");
}

//-->

</script>
</head>

<body>
<script language="javascript">
vmp = new MTSPlugin("cube.mtx", 400, 400, "", "simple",'');
</script>

<form>
<input type="text" name="opc" />
<input type="button" name="change" value="go" onclick="javascript:changeopacity();"/>
</form>

</body>
</html>
 
Posts: 181 | Registered: January 24, 2003Reply With QuoteEdit or Delete MessageReport This Post
  Powered by Eve Community