![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 7.
my_button
.menu =contextMenu
contextMenu
A ContextMenu object.
Property; associates the ContextMenu object contextMenu
with the button object my_button
. The ContextMenu class lets you modify the context menu that appears when the user right-clicks (Windows) or Control-clicks (Macintosh) in Flash Player.
The following example assigns a ContextMenu object to a Button object named save_btn
. The ContextMenu object contains a single menu item (labeled "Save...") with an associated callback handler function named doSave
(not shown).
var menu_cm = new ContextMenu(); menu_cm.customItems.push(new ContextMenuItem("Save...", doSave)); function doSave(menu, obj) { // "Save" code here } save_btn.menu = menu_cm;
ContextMenu class, ContextMenuItem class, MovieClip.menu, TextField.menu
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |