RE:
----------
>From: "Jaime Buie" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: <lingo-l> Shockwave browser control
>Date: Thu, Oct 18, 2001, 1:26 PM

>On my quit button I placed a script saying 
>on mouseUp 
>externalEvent("quitWBT()") 
>end 
>Then in the .htm file I placed the following JavaScript between the head tags 
><script language="JavaScript">
><!-- 
>// Close the WBT window.
>function quitWBT() {
>  window.close <file://window.close> ()
> }
></script> 
------------------

Just use:

window.close()

Omit the: <file://window.close> That must've gotten auto-inserted by
your authoring application or something.

You'll likey to add an equivalent VBscript function (or handler that
uses your JavaScript) for this to work in Internet Explorer.

I'd suggest instead making your button in Flash, and using the Flash
getURL actionScript command to deliver your window.close() directly. You
won't have to put any JavaScript code in the page or mess with
externalEvent funkiness at all if you write your button in Flash to say:

on (release) {
  getURL ("JavaScript:window.close()");
}

Pop the .swf button movie into your Director movie as a sprite and
include a movie script in the Director movie that says:

on getURL me, urlString
  gotoNetPage urlString
end

- to make sure that your Flash "getURL" actionScript is passed along to
the browser.

That way, your .dcr movie will close a browser window in any page you
run it in, even if there is no JavaScript in that page.


Steve Bennett
www.ifmp.net






















[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to