home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Event;
- import netscape.javascript.JSObject;
-
- public class dvstimer extends Applet implements Runnable {
- Thread animator;
- JSObject script;
- boolean scrollit;
- spart test;
- public int delaytime = -1;
-
- public void start() {
- if (this.animator == null) {
- this.scrollit = true;
- this.animator = new Thread(this);
- this.animator.start();
- }
-
- }
-
- public void stop() {
- if (this.animator != null) {
- this.scrollit = false;
- this.animator.stop();
- this.animator = null;
- }
-
- }
-
- public boolean mouseDown(Event var1, int var2, int var3) {
- this.animator.suspend();
- return true;
- }
-
- public boolean mouseUp(Event var1, int var2, int var3) {
- this.animator.resume();
- return true;
- }
-
- public void run() {
- while(this.scrollit) {
- this.script.call("scrollIt", (Object[])null);
-
- try {
- Thread.sleep((long)this.delaytime);
- } catch (InterruptedException var2) {
- }
- }
-
- }
-
- public void init() {
- this.delaytime = Integer.parseInt(((Applet)this).getParameter("delay"));
- this.script = JSObject.getWindow(this);
- this.scrollit = true;
- }
-
- public void stopscroll() {
- this.scrollit = false;
- }
- }
-