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

Popular posts from this blog

how to devide a circle into equal parts

"Could not fill because there are not enough opaque source pixels" - not solved by any other thread

Why can't I change the billing info for my account?