User Guide
449
open window
Syntax
window(whichWindow).open()
open window whichWindow
Description
Window command; opens the window object or movie file specified by whichWindow and brings it
to the front of the Stage. If no movie is assigned to the window, the Open File dialog box appears.
• If you replace whichWindow with a movie’s filename, the window uses the filename as
the window.
• If you replace whichWindow with a window name, the window takes that name. However, you
must then assign a movie to the window by using set the fileName of window.
To open a window that uses a movie from a URL, it’s a good idea to use the downloadNetThing
command to download the movie’s file to a local disk first and then use the file on the disk. This
minimizes problems with waiting for the movie to download.
For local media, the movie is not loaded into memory until the
open movie command is
executed. This can create a noticeable delay if you don’t use
preloadMovie to load at least the
first frame of the movie prior to issuing the
open window command.
Note: Opening a movie in a window is currently not supported in playback using a browser.
Example
This statement opens the window Control Panel and brings it to the front:
window("Control Panel").open()"
See also
close window, downloadNetThing, preLoadMovie
on openWindow
Syntax
on openWindow
statement(s)
end
Description
System message and event handler; contains statements that run when Director opens the movie
as a movie in a window and is a good place to put Lingo that you want executed every time the
movie opens in a window.
Example
This handler plays the sound file Hurray when the window that the movie is playing in opens:
on openWindow
puppetSound 2, "Hurray"
end