package NET.worlds.console; import NET.worlds.scape.CDAudio; import NET.worlds.scape.WavSoundPlayer; import java.io.IOException; public class InternetExplorer extends IUnknown implements MainCallback, MainTerminalCallback { WebBrowser _parent; public InternetExplorer(WebBrowser parent) throws IOException { ActiveX.init(this); this._parent = parent; this._refs = 1; Main.register(this); } @Override public synchronized void Release() throws OLEInvalidObjectException { if (this._refs > 0) { this._refs--; if (this._parent != null) { this._parent.close(); } ActiveX.uninit(this); } } @Override public String toString() { return "InternetExplorer(" + this.internalData() + ")"; } @Override public void mainCallback() { boolean justActivated = Window.getActivated(); if (justActivated) { WebBrowser killMe = WebBrowser.findTag("sound:"); if (killMe != null) { killMe.close(); } killMe = WebBrowser.findTag("videoMap:"); if (killMe != null) { killMe.close(); } killMe = WebBrowser.findTag("videoAd:"); if (killMe != null) { killMe.close(); } killMe = WebBrowser.findTag("zoom:"); if (killMe != null) { killMe.close(); } killMe = WebBrowser.findTag("zoomLeft:"); if (killMe != null) { killMe.close(); } killMe = WebBrowser.findTag("outside:"); if (killMe != null) { killMe.close(); } try { Thread.sleep(1L); } catch (InterruptedException var4) { } WavSoundPlayer.resumeSystem(); CDAudio.get().setEnabled(true); } } @Override public void terminalCallback() { Main.unregister(this); } }