Getting on the move.


Code

<head>
<title>Boat</title>
<script language="JavaScript">
var ball_1 = 0;
var ball_2 = 0;
function initialize()
{       
	document.Animator.setShapeRGB(13,133,147);  //color of sea
	document.Animator.addObject("rectangle", "x=0, y=-6, h=80, w=500"); 
		//add rectangle to make the water
	document.Animator.setShapeRGB(205,160,24);  //color of boat
	document.Animator.addObject("polyshape", "x=-15+(12*t), y=-2, n=11, "+
		"h=-20/-30/-1/-1/-25/0/25/1/1/30/20, "+
		"v=0/8/8/10/10/80/10/10/8/8/0");
			//adding polyshape, drawing the boat point to point
	document.Animator.addObject("image", "file=YellowBoat.gif, x=-12+(10*t),y=-3.5");
		//add an image as an object
	document.Animator.setTimeOneShot(5,"End");
	document.Animator.forward();
}
</script>
</head>

<body onload="JavaScript:initialize()">
<h2>Getting on the move.</h2>
<form name=myform>
<center>
    <applet code="animator4.Animator.class"
    codebase="../classes" id="Animator" name="Animator"
    archive="Animator4_.jar,STools4.jar"
    width="500" height="200">
      <param name="FPS" value="10">
      <param name="dt" value="0.02">
      <param name="pixPerUnit" value="10">
      <param name="gridUnit" value="1.0">
      <param name="showControls" value="false">
    </applet>
<br>
<input type=button value="Run" onClick="Javascript:document.Animator.forward()"><input type=button value ="Step Forward" onClick="Javascript:document.Animator.stepTimeForward()"><input type=button value ="Step Backward" onClick="Javascript:document.Animator.stepTimeBack()"><input type=button value="Pause" onclick=Javascript:document.Animator.pause()><input type=button value="Reset" onclick="Javascript:document.Animator.reset()">
</center>
<p></form>