ssCore.Popup.addItem

Add a new item to an existing popup menu.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

name - The name of the menu the new item will be added to.

parent - The menu id of the parent item for the new item. Items at the top level of a new menu should use 0 as the parent id.

type - The item type tells SWF Studio whether to add a menu item (item) or to start a new sub-menu (menu). Valid values include: item and menu.

id - The id used to refer to this item in the popup menu. Each item must have an id that is unique to the popup menu it is in.

text - The text that will be displayed for this menu item. Setting the menu text to '-' creates a menu separator instead of a normal menu item. If you insert \x01 in the item text, everything after that character will be right justified.

flags - Flags that control the initial state of the menu item. Valid values are 'checked' and 'disabled'. Specify multiple flags by separating them with spaces. Valid values include: checked and disabled.


Output Parameters:

No output parameters.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Popup.addItem( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Popup.addItem( paramsObject );


Notes:

None.


Examples:

ssCore.Popup.addItem({name:"MyMenu", parent:"0", type:"item", id:"1", text:"Item 1"});