home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 9 / cdrt09.iso / mac / UTAHDEMO / SHARED.DIR / 00742_Script_742 < prev    next >
Text File  |  1995-01-13  |  3KB  |  111 lines

  1. -- map stuff
  2.  
  3. on twoforone
  4.   doneMapNav
  5.   doneNav 0
  6.   go to label ("free")
  7.  
  8. on mapMouse
  9.   set x = the mouseH - the locH of sprite 16
  10.   set y = the mouseV - the locV of sprite 16
  11.  
  12.   repeat with n = 0 to 4 then
  13.     set min = n * 74
  14.     if (y >= min) and (y <= (min + 37)) then
  15.       return (n+1)
  16.     end if
  17.   end repeat
  18.   return (0)
  19.  
  20. on flashMapMenu
  21.   set inc = the locV of sprite 16
  22.   repeat with n = 0 to 4
  23.     set the locV of sprite 17 to (n * 74) + inc
  24.     updateStage
  25.   end repeat
  26.   set the locV of sprite 17 to 1440
  27.   updateStage
  28.  
  29. on checkMapMenu
  30.   global mapChoice
  31.   set inc = the locV of sprite 16 - 74
  32.   set mapChoice = 0
  33.  
  34.   if (rollover(16)) then
  35.      set mapChoice = mapMouse()
  36.   end if
  37.  
  38.     if (mapChoice) then
  39.        set the locV of sprite 17 to (mapChoice * 74) + inc
  40.        set the castNum of sprite (15) to the number of cast "menu titles" + mapChoice
  41.      else
  42.        set the locV of sprite 17 to 1440
  43.        set the castNum of sprite (15) to a51
  44.     end if
  45.  
  46.  
  47. on mapMenuChoice
  48.   global mapChoice
  49.   global prevMapChoice
  50.  
  51.   doneNav 0
  52.   doneMapNav
  53.    set prevMapChoice = mapChoice
  54.    set mapButton = mapMouse()
  55.   menuSound
  56.   if (mapChoice = 1) and (mapButton = 1) then
  57.     set buttonPressed = FALSE
  58.     doTrans 3
  59.     go to "overview"
  60.     preload label("overview")+1, label("lift tickets") - 1
  61.   else if (mapChoice = 2) and (mapButton = 2) then
  62.     set buttonPressed = FALSE
  63.     doTrans 3
  64.     puppetSound 0
  65.     go to "food"
  66.     preload label("food")+1, label("lodging") - 1
  67.   else if (mapChoice = 3) and (mapButton = 3) then
  68.     set buttonPressed = FALSE
  69.     doTrans 3
  70.     puppetSound 0
  71.     go to "lodging"
  72.     preload label("lodging")+1, label("ski school") - 1
  73.   else if (mapChoice = 4) and (mapButton = 4) then
  74.     set buttonPressed = FALSE
  75.     doTrans 3
  76.     puppetSound 0
  77.     go to "lift tickets"
  78.     preload label("lift tickets")+1, label("trail map") - 1
  79.   else if (mapChoice = 5) and (mapButton = 5) then
  80.     set buttonPressed = FALSE
  81.     doTrans 3
  82.     puppetSound 0
  83.     go to "ski school"
  84.     preload label("ski school")+1, label("overview") - 1
  85. end if
  86.  
  87. on unloadResortStuff
  88.   global prevMapChoice
  89.   global resortNum
  90.  
  91.   if (resortNum = 0) then return
  92.  
  93.     if (prevMapChoice = 1) then
  94.       unload label("overview")+1, label("lift tickets") - 1
  95.     else  if (prevMapChoice = 2) then
  96.       unload label("food")+1, label("lodging") - 1
  97.     else  if (prevMapChoice = 3) then
  98.       unload label("lodging")+1, label("ski school") - 1
  99.     else  if (prevMapChoice = 4) then
  100.       unload label("lift tickets")+1, label("trail map") - 1
  101.     else  if (prevMapChoice = 5) then
  102.       unload label("ski school")+1, label("overview") - 1
  103.     end if
  104.  
  105.     if (prevMapChoice > 5) then
  106.       unloadMap (prevMapChoice - 5)
  107.     end if
  108.  
  109.     set prevMapChoice = 0
  110.  
  111.