Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-08-2007, 06:56 AM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Tray Icon menu won't work?

The menu item comes up but when you click on one the event won't trigger. Code:


Application.SysTray.tip = "Current Drive:"+FlashPlayer.getVariable("_root.drivename") ;
Application.SysTray.add();
Application.SysTray.useDefaultHandler = false;
Application.SysTray.onRClicked = function(){
var menu = new Menu;
menu.createPopupMenu();
menu.appendItem("id0", "item 0");
menu.appendItem("id1", "item 1");
menu.appendItem();
menu.appendItem("id2", "item 2");
menu.appendItem("id3", "item 3");

menu.onCommand = function(id0){
getMainWnd().close();
}

getMainWnd().bringToTop();
menu.show();
};
Reply With Quote
  #2 (permalink)  
Old 12-09-2007, 09:46 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Tray Icon menu won't work?

"onCommand" is for the main menu. For a popup menu, the show method returns the id of the selected menu item directly:

Code:
var id = menu.show();

if (id == "id0") doSomething();
Reply With Quote
  #3 (permalink)  
Old 12-10-2007, 01:28 AM
Senior Member
 
Join Date: Nov 2007
Posts: 128
Default Re: Tray Icon menu won't work?

Thank you. Fixed!
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:41 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.