home *** CD-ROM | disk | FTP | other *** search
/ The Weather Channel - Everything Weather / TheWeatherChannel-EverythingWeather-Win31.iso / twcia / winterd / shared.dxr / 00101.ls next >
Encoding:
Text File  |  1995-08-23  |  3.9 KB  |  166 lines

  1. on globalButtonInit start, end
  2.   global lastChannel
  3.   set lastChannel to 0
  4.   repeat with i = start to end
  5.     puppetSprite(i, 1)
  6.   end repeat
  7. end
  8.  
  9. on freeSprites start, end
  10.   repeat with i = start to end
  11.     puppetSprite(i, 0)
  12.   end repeat
  13. end
  14.  
  15. on globalRollOver start, end
  16.   global lastChannel, backString, movieLocation
  17.   if lastChannel <> 0 then
  18.     if rollOver(lastChannel) then
  19.       exit
  20.     else
  21.       set the castNum of sprite lastChannel to the castNum of sprite lastChannel - 1
  22.       set lastChannel to 0
  23.     end if
  24.   end if
  25.   repeat with i = start to end
  26.     if rollOver(i) then
  27.       set the castNum of sprite i to the castNum of sprite i + 1
  28.       updateStage()
  29.       set lastChannel to i
  30.       exit
  31.     end if
  32.   end repeat
  33. end
  34.  
  35. on showSearch
  36.   global searchWindow, CDPath
  37.   if objectp(searchWindow) then
  38.     forget(searchWindow)
  39.   end if
  40.   set searchRect to rect(88, 51, 552, 429)
  41.   set searchWindow to window "search"
  42.   set the rect of searchWindow to searchRect
  43.   set the fileName of searchWindow to CDPath & "search\search"
  44.   set the titleVisible of searchWindow to 0
  45.   set the modal of searchWindow to 1
  46.   open(searchWindow)
  47.   pause()
  48. end
  49.  
  50. on link where
  51.   global searchWindow, linkString, backString, CDPath, mapNumber, OnLinePath, calPath
  52.   if objectp(searchWindow) then
  53.     forget(searchWindow)
  54.   end if
  55.   if where = EMPTY then
  56.     continue()
  57.     exit
  58.   end if
  59.   set linkString to where
  60.   set backString to "winterd 0 0 0 0"
  61.   cleanUp()
  62.   set name to word 1 of linkString
  63.   if name = "climate" then
  64.     go(value(word 2 of linkString), CDPath & name & "\" & name)
  65.   else
  66.     go(1, CDPath & name & "\" & name)
  67.   end if
  68.   exit
  69. end
  70.  
  71. on cleanUp
  72.   global CDPath, HDPath, calPath, OnLinePath, linkString, backString, linkFlag
  73.   set temp1 to CDPath
  74.   set temp2 to HDPath
  75.   set temp3 to linkString
  76.   set temp4 to backString
  77.   set temp5 to calPath
  78.   set temp6 to OnLinePath
  79.   set temp7 to linkFlag
  80.   clearGlobals()
  81.   set CDPath to temp1
  82.   set HDPath to temp2
  83.   set linkString to temp3
  84.   set backString to temp4
  85.   set calPath to temp5
  86.   set OnLinePath to temp6
  87.   set linkFlag to temp7
  88. end
  89.  
  90. on doHelp
  91.   global CDPath
  92.   puppetSound(0)
  93.   set the movieTime of sprite 35 to 1
  94.   set the movieRate of sprite 35 to 1
  95.   repeat while the mouseDown
  96.     nothing()
  97.   end repeat
  98.   repeat while the movieTime of sprite 35 < 270
  99.     globalRollOver(44, 48)
  100.     updateStage()
  101.     if the mouseDown then
  102.       stopHelp()
  103.     end if
  104.   end repeat
  105.   set the rect of sprite 40 to rect(14, 78, 169, 229)
  106.   set the visible of sprite 40 to 1
  107.   repeat with i = 1 to 19
  108.     set the visible of sprite 40 to not (the visible of sprite 40)
  109.     updateStage()
  110.     repeat with n = 1 to 5
  111.       globalRollOver(44, 48)
  112.       updateStage()
  113.       if the mouseDown then
  114.         stopHelp()
  115.       end if
  116.     end repeat
  117.     globalRollOver(44, 48)
  118.     updateStage()
  119.     if the mouseDown then
  120.       stopHelp()
  121.     end if
  122.   end repeat
  123.   repeat while the movieTime of sprite 35 < 740
  124.     globalRollOver(44, 48)
  125.     updateStage()
  126.     if the mouseDown then
  127.       stopHelp()
  128.     end if
  129.   end repeat
  130.   set the rect of sprite 40 to rect(576, 120, 632, 394)
  131.   set the visible of sprite 40 to 1
  132.   repeat with i = 1 to 39
  133.     set the visible of sprite 40 to not (the visible of sprite 40)
  134.     updateStage()
  135.     repeat with n = 1 to 5
  136.       globalRollOver(44, 48)
  137.       updateStage()
  138.       if the mouseDown then
  139.         stopHelp()
  140.       end if
  141.     end repeat
  142.     globalRollOver(44, 48)
  143.     updateStage()
  144.     if the mouseDown then
  145.       stopHelp()
  146.     end if
  147.   end repeat
  148.   repeat while not (the mouseDown)
  149.     globalRollOver(44, 48)
  150.     updateStage()
  151.     if the movieTime of sprite 35 >= the duration of cast 100 then
  152.       exit repeat
  153.     end if
  154.   end repeat
  155.   set the visible of sprite 40 to 0
  156.   set the movieRate of sprite 35 to 0
  157.   set the movieTime of sprite 35 to 1
  158. end
  159.  
  160. on stopHelp
  161.   set the visible of sprite 40 to 0
  162.   set the movieRate of sprite 35 to 0
  163.   set the movieTime of sprite 35 to 1
  164.   abort()
  165. end
  166.