| Previous | Next | |
Windows: Flash 8 or 9 AS2.0 SWF + mProjector
3.0; Windows 98/ME/NT Support: Flash 7 SWF + mProjector
2.0;
Macintosh: Flash 8 or 9 AS2.0 SWF + mProjector
1.1;
mMenu.onCommand = function (menuName:String, , menuItem:String) {
// your statements here
}menuName - Name of active menu.
menuItem - Name of selected menu item.
NOTE: mProjector Windows version 2.0 has only one parameter for this event handler, the item number (integer) of the selected menu item.
Nothing.
Event handler; An event handling function called after a menu item is selected. You must define a function that executes when the event handler is invoked. This function should be defined in the application's main swf.
The following sample creates a custom popup right-click menu.
mMenu.removeAllItems();
mMenu.addItem("Minimize");
mMenu.addItem("Restore");
mMenu.addSeparator();
mMenu.addItem("Online Documentation");
mMenu.addItem("Contact Tech Support");
mMenu.addItem("Forum");
mMenu.addItem("Check for Updates");
mMenu.addSeparator();
mMenu.addItem("Visit ScreenTime Media");
mMenu.onCommand = function (menuName, itemName)
{
switch (itemName)
{
case "Minimize":
mWindow.minimize();
break;
case "Restore":
mWindow.restore();
break;
case "Online Documentation":
mSystem.openDocument("http://www.screentime.com/software/mprojector/docs/");
break;
case "Contact Tech Support":
mSystem.openDocument("mailto:support@screentime.com");
break;
case "Forum":
getURL("http://forum.screentime.com");
break;
case "Check for Updates":
mSystem.openDocument("http://www.screentime.com/mprojector/updates/");
break;
case "Visit ScreenTime Media":
mSystem.openDocument("http://www.screentime.com/");
break;
}
} | Questions or Feedback? | Previous | Next |