Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-31-2008, 09:09 AM
Junior Member
 
Join Date: Apr 2008
Posts: 6
Default Context Menu Question

Hi,

I would like to show a menu when user right-click on a movie clip.
Following is my code
Code:
import SWFKit.*;
var fp = new FlashPlayer;
fp.setEventHandler("onContextMenu", onContextMenu);
fp.Release();
function onContextMenu() {
	if (mc1.hitTest(_xmouse, _ymouse, false)) {
		menu = new Menu();
		menu.createPopupMenu();
		menu.appendItem("id0", "item 0");
		switch (menu.show()) {
		case "id0" :
			Dialogs.msgBox("item 0!");
			break;
		}
	}
}
It does work and pop up the message.
But the problem is once the menu show up, the menu will display even I right-click outside of the movie clip.
Menu disappear only when I select a item or left-click somewhere outside the menu.

According to manual, menu.show() :
Quote:
The method won't return until a menu item has been clicked or user clicked outside the menu.
Does the "user clicked outside the menu" mean only left-click outside the menu?
Any other way to archive what I want, i.e. menu display ONLY right-click the movie clip ?

Thanks
Reply With Quote
  #2 (permalink)  
Old 11-03-2008, 09:49 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Context Menu Question

We're not sure yet, because the menus are controlled by the windows system. We'll get back to you if we find a solution.
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 05:24 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.