Popup Menu DLL Test Movieby Scott KildallYou can select an item from the popup menu on the left to be modified. Changes such as disabling/enabling items or setting the text of items will be reflected on the "working popup menu" on the right. The entry box is used for changing the text of a menu item with "Set Text", "New Menu" or "Append Menu." This sample movie will run on the Mac with the Popup Menu XObject or the PC with the Popup Menu DLL.
Item to modify:
Working Popup Menu
Item 1
Item 1Item 2Item 3Item 4Item 5
Instructions:
Script Channel Commands
--------------------
go to the frame
vwci
----
1026: on mouseUp global hiliteLine set m = the mouseLine if m > 0 then hilite line m of field "popup list" if hiliteLine = 0 then ShowControls() set hiliteLine = mend mouseUp
popup list
1029:
popup name
1030: popup id
1031: popup display
1033: on mouseDown global thePopup if objectP(thePopup) then DoPopupend mouseDown
1034: lastselected
1035: on mouseUp global workingPopup, selectionNum workingPopup(mEnableItem, selectionNum)end mouseUp
1037: on mouseDown DoSelectionPopupend mouseDownselection display
1038: on mouseUp global workingPopup, selectionPopup, selectionNum workingPopup(mSetItem, selectionNum, l
1039: on mouseUp global workingPopup, selectionNum workingPopup(mDisableItem, selectionNum)end mouseUp
1040: on mouseUp end mouseUp entry box
1041: lastselected
1042: on mouseUp global workingPopup, selectionPopup -- Dispose of all items in the menu workingPopup(mDispose) selectionPopup(mDispose) MakePopups(field "entry box") put field "entry box" into field "current list" end mouseUp new popup
1043: on mouseUp global selectionPopup, workingPopup selectionPopup(mAppendMenu, field "entry box") workingPopup(mAppendMenu, field "entry box")end mouseUp
1044: on mouseUp global hiliteLine set m = the mouseLine if m > 0 then hilite line m of field "popup list" if hiliteLine = 0 then ShowControls() set hiliteLine = mend mouseUpsaved popup list
1045: on mouseUp global workingPopup if the hilite of cast "markerState" = true then --Check all items workingPopup(mSetItemMark, 18) else workingPopup(mSetItemMark, 0) end ifend mouseUpmarkerState
1052: on mouseDown DoWorkingPopupend mouseDownworking display
1053: on mouseUp global hiliteLine set m = the mouseLine if m > 0 then hilite line m of field "popup list" if hiliteLine = 0 then ShowControls() set hiliteLine = mend mouseUpcurrent list