public trackAsMenu : Boolean
A Boolean value that indicates whether other buttons or movie clips can receive a release event from a mouse or stylus. If you drag a stylus or mouse pointer across a button and then release it on a second button, the onRelease event is registered for the second button. This allows you to create menus for the second button. You can set the trackAsMenu property on any button or movie clip object. If you have not defined the trackAsMenu property, the default behavior is false.
You can change the trackAsMenu property at any time; the modified button immediately takes on the new behavior.
Note: The trackAsMenu property is supported for Flash Lite 2.0 only if System.capabilities.hasMouse is true or System.capabilities.hasStylus is true.
The following example demonstrates how to track two buttons as a menu. Place two button instances called one_btn and two_btn on the stage. Enter the following ActionScript in the Timeline:
var one_btn:Button;
var two_btn:Button;
one_btn.trackAsMenu = true;
two_btn.trackAsMenu = true
one_btn.onRelease = function() {
trace("clicked one_btn");
};
two_btn.onRelease = function() {
trace("clicked two_btn");
};
To test the SWF file, click the Stage over one_btn, hold the mouse button down, and release it over two_btn. Then try commenting out the two lines of ActionScript that contain trackAsMenu and test the SWF file again to see the difference in button behavior.