<SCRIPT> function infoFromJava_Slider(sliderName,waarde) { document.formA.field1.value = waarde; } function reStart() { t = 0.0; dt = 0.0005; x = 1.0; y = 1.0; a = 1.0; i = 150; j = 150; document.slider1.setPMax(2.0); document.slider1.setPMin(0.0); document.slider1.setPStart(1.0); document.slider1.setDigits(4); document.vogel1.setX(Math.round(i)); document.vogel1.setY(Math.round(j)); document.formA.field2.value = t; } function run() { iii = document.formA.field1.value; a = parseFloat(iii); t = t + dt; x = a*Math.sin(2*3.14*t); y = a*Math.cos(2*3.14*t); i = 100*x + 150; j = -100*y + 150; document.vogel1.setX(Math.round(i)); document.vogel1.setY(Math.round(j)); document.formA.field2.value = t; if (t<1.0) {window.setTimeout("run();",5)}; } </SCRIPT> . . <CENTER> <FORM NAME="formA"> <APPLET code=slider.class NAME=slider1 width=300 height=16 MAYSCRIPT> </APPLET> <INPUT TYPE="text" NAME="field1" VALUE="aaaa" SIZE="10"><BR> <INPUT TYPE="button" name="Start" value="Set" onClick="reStart(this.form)"><BR> <INPUT TYPE="button" name="Run" value="Run" onClick="run(this.form)"><BR> <INPUT TYPE="text" NAME="field2" VALUE="bbbb" SIZE="10"><BR> <APPLET code="Piranihan.class" NAME=vogel1 width=300 height=300> </APPLET> </FORM> </CENTER>
Enschede, 2 maart 2000; update: Febr. 2004