home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / browser / ns405lyc / swave.z / ShockwavePlugin.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-05-27  |  1.3 KB  |  42 lines

  1. import netscape.javascript.JSObject;
  2. import netscape.plugin.Plugin;
  3.  
  4. class ShockwavePlugin extends Plugin {
  5.    JSObject win;
  6.    boolean bAutoStart;
  7.  
  8.    public native void Play();
  9.  
  10.    public native void Stop();
  11.  
  12.    public native void Rewind();
  13.  
  14.    public native int GetCurrentFrame();
  15.  
  16.    public native void GotoFrame(int var1);
  17.  
  18.    public native void GotoMovie(String var1);
  19.  
  20.    public native String EvalScript(String var1);
  21.  
  22.    public void AutoStart(boolean var1) {
  23.       this.bAutoStart = var1;
  24.    }
  25.  
  26.    public boolean AutoStart() {
  27.       return this.bAutoStart;
  28.    }
  29.  
  30.    public void init() {
  31.       this.win = ((Plugin)this).getWindow();
  32.       this.bAutoStart = true;
  33.    }
  34.  
  35.    public void CallBrowserScript(String var1) {
  36.       String var2 = "yo. " + var1 + "\n";
  37.       System.out.print(var2);
  38.       this.win.eval("alert(\"about to call whatever string was passed to me\");");
  39.       this.win.eval(var1);
  40.    }
  41. }
  42.