Creating An Interactive Screen Saver

In most cases you will want ScreenTime to quit the screen saver on mouse or key events. However if you want to add interactivity to your screen saver, and receive and respond to user input, uncheck the "quit on" mouse and/or key events check boxes in the Content panel of the ScreenTime compiler.

Quitting the Screen Saver via ActionScript

With these boxes unchecked, you will need to add some facility to quit the screen saver using one of the STM quit methods: STF.quit(), STF.quitSafe(), STF.launchAndQuit(), STF.forceUserLogOff().

STF.quit() exits the screen saver immediately. This command is recommended for screen savers that do not include links to websites.

STF.quitSafe(), on Windows, quits the screen saver after all sub-launched windows have been closed. If your screen saver includes a link to your website, use this command to quit the saver. This is important because in most cases your screen saver will be playing on the Windows alternative or "security" desktop -- seperate from the standard desktop. Processes launched on the security desktop live only there, and cannot talk to the standard desktop. If the saver opens a browser, and then is quit using STF.quit(), the browser process will be orphaned, and will steal processor time without being seen again.

On the Mac, this method behaves just like STF.quit() and quits the screen saver.

This command is recommended for Windows screen savers that include links to websites.

STF.launchAndQuit() launches a website and quits the screen saver.

If the screen saver is running on Windows, the screen saver will go black, launch the browser and return to the standard desktop once the browser is closed or minimized by the user. This is a built-in security feature in Windows that makes it more difficult to obtain access to the user's files. See STF.quitSafe() above.

This command is recommended for Mac screen savers that include links to websites.

STF.forceUserLogOff(), on Windows, quits the screen saver, logs off the current user, and returns the computer to the user login screen. On the Mac this method behaves like STF.quit() and just quits the screen saver.