home *** CD-ROM | disk | FTP | other *** search
/ OK CD GAMER Epoca 1 / OKCDG01.iso / DEMOS / OTROS / SIMPSONS / SUPPORT / DLOGDATA / ALERT.DXR / 00016.ls < prev    next >
Encoding:
Text File  |  1996-08-16  |  5.0 KB  |  106 lines

  1. global btnScriptList, alertWindow, PCflag
  2.  
  3. on startMovie
  4.   set the modal of alertWindow to 1
  5.   set the exitLock to 1
  6.   puppetSprite(2, 1)
  7.   puppetSprite(3, 1)
  8.   puppetSprite(4, 1)
  9.   puppetSprite(5, 1)
  10. end
  11.  
  12. on show theMessage, theAlertBoxType, button1script, button2script, button3script
  13.   set alertBoxSprite to 1
  14.   set alertBoxButton1 to 2
  15.   set alertBoxButton2 to 3
  16.   set alertBoxButton3 to 4
  17.   set alertBoxMessage to 5
  18.   if PCflag then
  19.     set the textFont of field "alert box message" to "Arial"
  20.     set the textSize of field "alert box message" to 12
  21.     set the textStyle of field "alert box message" to "bold"
  22.   else
  23.     set the textFont of field "alert box message" to "Geneva"
  24.     set the textSize of field "alert box message" to 14
  25.     set the textStyle of field "alert box message" to "bold"
  26.   end if
  27.   set buttonCastList to [1, 3, 5, 7, 9, 11]
  28.   set btnScriptList to ["nothing", "nothing", "nothing"]
  29.   if theAlertBoxType = #OK then
  30.     set the locH of sprite alertBoxButton1 to -1000
  31.     set the locH of sprite alertBoxButton2 to -1000
  32.     setAt(btnScriptList, 3, button3script)
  33.     set theBtnCastNum to getAt(buttonCastList, 1)
  34.     set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
  35.     set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
  36.     set the castNum of sprite alertBoxButton3 to theBtnCastNum
  37.     set the loc of sprite alertBoxButton3 to point(345, 128)
  38.   else
  39.     if theAlertBoxType = #cancel_ok then
  40.       set the locH of sprite alertBoxButton1 to -1000
  41.       setAt(btnScriptList, 2, button2script)
  42.       set theBtnCastNum to getAt(buttonCastList, 2)
  43.       set the width of sprite alertBoxButton2 to the width of cast theBtnCastNum
  44.       set the height of sprite alertBoxButton2 to the height of cast theBtnCastNum
  45.       set the castNum of sprite alertBoxButton2 to theBtnCastNum
  46.       set the loc of sprite alertBoxButton2 to point(215, 128)
  47.       setAt(btnScriptList, 3, button3script)
  48.       set theBtnCastNum to getAt(buttonCastList, 1)
  49.       set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
  50.       set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
  51.       set the castNum of sprite alertBoxButton3 to theBtnCastNum
  52.       set the loc of sprite alertBoxButton3 to point(345, 128)
  53.     else
  54.       if theAlertBoxType = #dontsave_cancel_save then
  55.         setAt(btnScriptList, 1, button1script)
  56.         set theBtnCastNum to getAt(buttonCastList, 5)
  57.         set the width of sprite alertBoxButton1 to the width of cast theBtnCastNum
  58.         set the height of sprite alertBoxButton1 to the height of cast theBtnCastNum
  59.         set the castNum of sprite alertBoxButton1 to theBtnCastNum
  60.         set the loc of sprite alertBoxButton1 to point(80, 128)
  61.         setAt(btnScriptList, 2, button2script)
  62.         set theBtnCastNum to getAt(buttonCastList, 2)
  63.         set the width of sprite alertBoxButton2 to the width of cast theBtnCastNum
  64.         set the height of sprite alertBoxButton2 to the height of cast theBtnCastNum
  65.         set the castNum of sprite alertBoxButton2 to theBtnCastNum
  66.         set the loc of sprite alertBoxButton2 to point(215, 128)
  67.         setAt(btnScriptList, 3, button3script)
  68.         set theBtnCastNum to getAt(buttonCastList, 4)
  69.         set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
  70.         set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
  71.         set the castNum of sprite alertBoxButton3 to theBtnCastNum
  72.         set the loc of sprite alertBoxButton3 to point(345, 128)
  73.       else
  74.         if theAlertBoxType = #credits_cancel_ok then
  75.           setAt(btnScriptList, 1, button1script)
  76.           set theBtnCastNum to getAt(buttonCastList, 6)
  77.           set the width of sprite alertBoxButton1 to the width of cast theBtnCastNum
  78.           set the height of sprite alertBoxButton1 to the height of cast theBtnCastNum
  79.           set the castNum of sprite alertBoxButton1 to theBtnCastNum
  80.           set the loc of sprite alertBoxButton1 to point(80, 128)
  81.           setAt(btnScriptList, 2, button2script)
  82.           set theBtnCastNum to getAt(buttonCastList, 2)
  83.           set the width of sprite alertBoxButton2 to the width of cast theBtnCastNum
  84.           set the height of sprite alertBoxButton2 to the height of cast theBtnCastNum
  85.           set the castNum of sprite alertBoxButton2 to theBtnCastNum
  86.           set the loc of sprite alertBoxButton2 to point(215, 128)
  87.           setAt(btnScriptList, 3, button3script)
  88.           set theBtnCastNum to getAt(buttonCastList, 1)
  89.           set the width of sprite alertBoxButton3 to the width of cast theBtnCastNum
  90.           set the height of sprite alertBoxButton3 to the height of cast theBtnCastNum
  91.           set the castNum of sprite alertBoxButton3 to theBtnCastNum
  92.           set the loc of sprite alertBoxButton3 to point(345, 128)
  93.         end if
  94.       end if
  95.     end if
  96.   end if
  97.   set the text of field "alert box message" to theMessage
  98.   updateStage()
  99. end
  100.  
  101. on doButtonScript whichButton
  102.   tell the stage
  103.     handleAlertBox(getAt(btnScriptList, whichButton))
  104.   end tell
  105. end
  106.