|
|||
|
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;
}
}
}
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:
Any other way to archive what I want, i.e. menu display ONLY right-click the movie clip ? Thanks |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|