Tray Overview

The Tray commands enable you to control the behavior of your application in the Windows system tray. You can add an icon to the system tray, change it, and remove it. You can also change the tooltip text, display a message balloon, and receive a notification when someone clicks the application icon in the system tray.

The Windows system tray is always on the far right or bottom of the Windows taskbar depending on where the taskbar is docked, and can contain icons of programs. This is typically at the bottom of the screen, so the system tray is typically to the far-right bottom of the screen, next to the system clock. A tooltip is the text that appears when you keep the mouse over an icon in the system tray. A message balloon is text with a rounded border and a pointer, which points to the icon from which it is originating. The message balloon can also contain a bold title and an icon usually used to indicate the context of the message.

In order to take advantage of the Tray features you need to add your application to the system tray, either using the Tray commands or by selecting the option in the SWF Studio interface. See Tray.addIcon, Tray.setIcon, and Application Tab of the User Interface.

One use for the onTrayClick notification is to activate a Popup menu. By default left-clicking on the icon in the system tray will bring your application to the foreground and give it focus. Setting up a notification for the onTrayClick event will mean the default behavior will be ignored and you can make your application do what you want.