I build basic software simulations (Office products, Graphic
Design products, etc.) that often require a custom context menu.
The method we use requires two menus to be pushed; one that hides
the built-in items and one that contains the custom items. The
custom menu is attached to a button instance with only a hit state
var rClickMenu1_cm:ContextMenu = new ContextMenu();
var a = new ContextMenuItem("Update Driver...", wrong);
var b = new ContextMenuItem("Disable", wrong);
var c = new ContextMenuItem("Uninstall", wrong);
var d = new ContextMenuItem("Scan for hardware changes",
var e = new ContextMenuItem("Properties", correct1, true);
rClickMenu1_cm.customItems.push(a, b, c, d, e);
rClick1_btn.menu = rClickMenu1_cm;
The second menu (to hide the built-in items) is in the first
frame of an actions layer:
var root_cm:ContextMenu = new ContextMenu();
_root.menu = root_cm;
This has worked fine until my clients (and I) began running
Flash Player 9 (most often after an update to IE 7). The custom
items attached to the button no longer appear. I've found
work-arounds (using a movie-clip instance, or using an button where
the up/over/down are all set to alpha 0) but I'm curious if there
is something in the code I could change, or any other fix for that
matter--I'd really rather not go back and rebuild all the
simulations I have built. I'm using Flash 8 Pro, publishing to
Flash 7 AS 2.0.
I have encountered a similar problem with the context menu.
The simulations I created using a custom menu worked fine in Flash
Player 7 and 8, but do not work in Flash Player 9. I am wondering
if you ever got an answer to your question.