home *** CD-ROM | disk | FTP | other *** search
- global btnScriptList, alertWindow, PCflag
-
- on startMovie
- set the modal of alertWindow to 1
- set the exitLock to 1
- puppetSprite(2, 1)
- puppetSprite(3, 1)
- puppetSprite(4, 1)
- puppetSprite(5, 1)
- end
-
- on show theMessage, theAlertBoxType, button1script, button2script, button3script
- set alertBoxSprite to 1
- set alertBoxButton1 to 2
- set alertBoxButton2 to 3
- set alertBoxButton3 to 4
- set alertBoxMessage to 5
- if PCflag then
- set the textFont of field "alert box message" to "Arial"
- set the textSize of field "alert box message" to 12
- set the textStyle of field "alert box message" to "bold"
- else
- set the textFont of field "alert box message" to "Geneva"
- set the textSize of field "alert box message" to 14
- set the textStyle of field "alert box message" to "bold"
- end if
- set buttonCastList to [1, 3, 5, 7, 9, 11]
- set btnScriptList to ["nothing", "nothing", "nothing"]
- if theAlertBoxType = #OK then
- set the locH of sprite alertBoxButton1 to -1000
- set the locH of sprite alertBoxButton2 to -1000
- setAt(btnScriptList, 3, button3script)
- set theBtnCastNum to getAt(buttonCastList, 1)
- set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton3 to theBtnCastNum
- set the loc of sprite alertBoxButton3 to point(345, 128)
- else
- if theAlertBoxType = #cancel_ok then
- set the locH of sprite alertBoxButton1 to -1000
- setAt(btnScriptList, 2, button2script)
- set theBtnCastNum to getAt(buttonCastList, 2)
- set the width of sprite alertBoxButton2 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton2 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton2 to theBtnCastNum
- set the loc of sprite alertBoxButton2 to point(215, 128)
- setAt(btnScriptList, 3, button3script)
- set theBtnCastNum to getAt(buttonCastList, 1)
- set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton3 to theBtnCastNum
- set the loc of sprite alertBoxButton3 to point(345, 128)
- else
- if theAlertBoxType = #dontsave_cancel_save then
- setAt(btnScriptList, 1, button1script)
- set theBtnCastNum to getAt(buttonCastList, 5)
- set the width of sprite alertBoxButton1 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton1 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton1 to theBtnCastNum
- set the loc of sprite alertBoxButton1 to point(80, 128)
- setAt(btnScriptList, 2, button2script)
- set theBtnCastNum to getAt(buttonCastList, 2)
- set the width of sprite alertBoxButton2 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton2 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton2 to theBtnCastNum
- set the loc of sprite alertBoxButton2 to point(215, 128)
- setAt(btnScriptList, 3, button3script)
- set theBtnCastNum to getAt(buttonCastList, 4)
- set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton3 to theBtnCastNum
- set the loc of sprite alertBoxButton3 to point(345, 128)
- else
- if theAlertBoxType = #credits_cancel_ok then
- setAt(btnScriptList, 1, button1script)
- set theBtnCastNum to getAt(buttonCastList, 6)
- set the width of sprite alertBoxButton1 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton1 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton1 to theBtnCastNum
- set the loc of sprite alertBoxButton1 to point(80, 128)
- setAt(btnScriptList, 2, button2script)
- set theBtnCastNum to getAt(buttonCastList, 2)
- set the width of sprite alertBoxButton2 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton2 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton2 to theBtnCastNum
- set the loc of sprite alertBoxButton2 to point(215, 128)
- setAt(btnScriptList, 3, button3script)
- set theBtnCastNum to getAt(buttonCastList, 1)
- set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
- set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
- set the castNum of sprite alertBoxButton3 to theBtnCastNum
- set the loc of sprite alertBoxButton3 to point(345, 128)
- end if
- end if
- end if
- end if
- set the text of field "alert box message" to theMessage
- updateStage()
- end
-
- on doButtonScript whichButton
- tell the stage
- handleAlertBox(getAt(btnScriptList, whichButton))
- end tell
- end
-