User Guide
416 Chapter 18: Movies in a Window
Controlling MIAW layering
To control whether a movie appears in front of or behind other windows:
• Use the moveToFront() and moveToBack() methods. For more information about these
methods, see the Scripting Reference topics in the Director Help Panel.
This code moves a MIAW to the front:
window("miaw").moveToFront()
This code moves a MIAW to the back:
window("miaw").moveToBack()
MIAW events
Lingo or JavaScript syntax provides event handlers for typical events that can occur while a
MIAW is playing, such as the movement of a window by the user. Such a handler is a good place
for instructions that you want to run in response to an event that involves a window.
For example, to cause a sound to play whenever the user closes a MIAW, use the
queue() and
play()
methods in an on closeWindow handler in a movie script within the movie that plays in
the window. The
on closeWindow handler will run whenever the MIAW that contains the
handler closes.
Other handlers include:
• on moveWindow (called when a user moves the movie's window)
• on resizeWindow (called when a user resizes the movie's window)
• on zoomWindow (called when the minimize or maximize box of a movie's window is pressed)
• on openWindow (called when the movie's window is opened)
• on closeWindow (called when the movie's window is closed)
• on activateWindow (when a movie's window is activated)
• on deactivateWindow (when a movie's window is deactivated)
• on revealWindow (when a dockable MIAW in authoring is revealed)
• on collapseWindow (when a dockable MIAW in authoring is collapsed)
• on activateApplication (when the entire application has been activated)
• on deactivate Application (when the entire application has been deactivated)
• on trayIconMouseDown (Windows only) This event handler is triggered when a user mouses
down on the Window's system tray icon. This event is only meaningful if the
systemTrayIcon property is set to true.
• on trayIconDoubleClick (Windows only) This event handler is triggered when a user
double-clicks on the Window's system tray icon. This event is only meaningful if the
systemTrayIcon property is set to true.
• on trayIconRightMouseDown (Windows only) This event handler is triggered when a user
right mouses down on the Window's system tray icon. This event is only meaningful if the
systemTrayIcon property is set to true. For example:
on trayIconRightMouseDown
alert ("right mouse down")
end