Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selectable submenu checkboxes 1

Status
Not open for further replies.

rolan18

Programmer
May 11, 2006
26
0
0
CA
I am looking at making submenus that create small checkmarks beside a submenu after you've selected them

much like in flash under the Window menu when you select Library there is a checkmark beside it...

is there a way i can do this using the addMenuItem() command, or do I have to take a slightly different approach...

Thanks
 
myMenu.addMenuItem({label: "Friday", type: "check"});

just add them all as type check

 
I was also wanting to know if there is a way in which I can make it so that I can only select one item in a menu when it is chosen.

When one item is selected and then another is selected afterwards, I would like the first item to no longer be selected.

Do I have to make the menubar using the XML method to do this?
 
by default checkboxes always allow for multiple selections

i suppose you could add a loop to your change function and step through all menuitems unchecking those already checked

personally i think you will be best to go with a radio button which by default can have one one selection for each radiogroup

myMenu.addMenuItem({label: "Friday", type: "radio",groupName:"radioGroup"});
myMenu.addMenuItem({label: "Saturday", type: "radio",groupName:"radioGroup"});

can be done either with actionscript as above or with xml. xml is much better if the menu will be much edited in the future
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top