Accessibility

TechNote (Archived)

Capturing quit (exit) requests when exitLock is enabled

Issue


When a movie's exitLock property is settotrue or when the exit Lock option is checked in the Projector tab of the Publish Settings window, a user cannot close the projector using the standard keyboard quit options;such as clicking the Close button in the title bar; pressing Alt-F4 (Windows), Control-Q (Windows) or Command-Q (Macintosh); and clicking the Esc button (Windows);or from the dock/taskbar or system menu.

Solution


Developers wishing to use the exitLock property can capture a user's attempt to close the projector by using the following features:

Director MX 2004

The On closeRequest event handler contains statements that run when a user has attempted to close the projector. This handler is triggered when a user attempts to close the projector, but only if the exitLock property is set to true.

Developers can use this handler to create quit/exit dialog boxes, which allows users to confirm they really want to quit the projector. If the users confirm they want to exit, then aHalt or Quit command can be executed to exit the projector. See below for sample usage code:

 -- Lingo syntax on closeRequest statement(s) end // JavaScript syntax function closeRequest() { statement(s); } 

Note: This is currently an undocumented feature and is not included in Director MX 2004s Help documentation.

Director MX and below

Use a third party Xtra such as the Quit Message Xtra fromMediaMacros to catch if the users attempted to close the projector. You can also search for other third party Xtras from the links below:

Note: Third party Xtras are not supported by Macromedia or Macromedia Technical Support. Please contact the developers of the Xtra for more information and support for these products.

Additional information

In order to capture quit requests when exitLock is disabled, the stopMovie handler can be used. This handler is run when the projector stops playing, and is usually used for cleanup tasks. Refer to the Lingo Dictionary for more information regarding this handler.

AlertThis content requires Flash

To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Download the free Flash Player now!

Get Adobe Flash Player

Creative Commons License

Search Support


Document Details

ID:tn_19196
Browser:Chrome
Internet Explorer
Netscape
Opera
Safari
Firefox

Products Affected: