ContextMenu Submenu Issue
i'm having trouble getting submenu work on right-click contextmenu.
here code:
var igncontext:contextmenuitem = new contextmenuitem("ignition status");
var ignsubcontext:contextmenu = new contextmenu;
var oncontext:contextmenuitem = new contextmenuitem("on");
var offcontext:contextmenuitem = new contextmenuitem("off");
ignsubcontext.additem(oncontext);
ignsubcontext.additem(offcontext);
igncontext.submenu = ignsubcontext;
when right-click, see "ignition status" little arrow indicating has submenu, submenu not list when mouse-over or click on it. used same method when created file drop-down menu submenus, doesn't seem work correctly here.
edit:
i should note "igncontext" added mycontextmenu:contextmenu set this.contextmenu = mycontextmenu.
show relevant code.
and, line 2 should new contextmenu();
More discussions in ActionScript 3
adobe
Comments
Post a Comment