Can anyone please help me in adding the following behaviour to a menu option (It is a dialogue box asking the user if they want to quit). I want to have the user select the exit from a drop down menu and then have the box pop up asking them if they are sure they want to quit. I have the menu but don't know how to go about attaching the behaviour to it.
on endGame me
-- check if player really wnats to EXIT movie
-- create an instance of the MUI object
myMui = new(xtra "mui"
-- define attributes of the dialog box in a property list
myList = [:]
myList.addprop (#buttons, #YesNo)
myList.addprop (#default, 2)
myList.addprop (#title, "Quit"
myList.addprop (#Message, "Do you really want to quit?"
myList.addprop (#icon, #question)
myList.addprop (#moveable, false)
-- post the dialog and wait for a user response
myChoice = alert(myMui, myList)
-- dispose of the MUI objects when done
myMui = 0
-- will only quit if the YES button was clicked
if myChoice = 1 then halt
end
on endGame me
-- check if player really wnats to EXIT movie
-- create an instance of the MUI object
myMui = new(xtra "mui"
-- define attributes of the dialog box in a property list
myList = [:]
myList.addprop (#buttons, #YesNo)
myList.addprop (#default, 2)
myList.addprop (#title, "Quit"
myList.addprop (#Message, "Do you really want to quit?"
myList.addprop (#icon, #question)
myList.addprop (#moveable, false)
-- post the dialog and wait for a user response
myChoice = alert(myMui, myList)
-- dispose of the MUI objects when done
myMui = 0
-- will only quit if the YES button was clicked
if myChoice = 1 then halt
end