home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / ch08_lgo / tutor.dcr / 00002.ls < prev    next >
Encoding:
Text File  |  1996-12-06  |  1.5 KB  |  61 lines

  1. on getCurrLabel
  2.   set lastLine to the number of lines in the labelList - 1
  3.   repeat with i = 1 to lastLine
  4.     if the frame < label(line i of the labelList) then
  5.       if i > 1 then
  6.         return line i - 1 of the labelList
  7.       else
  8.         return EMPTY
  9.       end if
  10.       exit
  11.     end if
  12.   end repeat
  13.   return line lastLine of the labelList
  14. end
  15.  
  16. on fadeAllSounds fadeDuration
  17.   if soundBusy(1) or soundBusy(2) then
  18.     set lPlaying to 1
  19.   end if
  20.   if soundBusy(1) then
  21.     sound fadeOut 1, fadeDuration
  22.   end if
  23.   if soundBusy(2) then
  24.     sound fadeOut 2, fadeDuration
  25.   end if
  26.   if lPlaying = 1 then
  27.     waitForTicks(fadeDuration)
  28.   end if
  29. end
  30.  
  31. on checkRollN loSprite, hiSprite
  32.   global gLastRollover, gSpriteName, gHelpOffset
  33.   repeat with checkSprite = loSprite to hiSprite
  34.     if rollOver(checkSprite) then
  35.       set cRoll to 1
  36.       exit repeat
  37.     end if
  38.   end repeat
  39.   if cRoll then
  40.     if checkSprite <> gLastRollover then
  41.       if gLastRollover <> 0 then
  42.         set the visible of sprite (gLastRollover + gHelpOffset) to 0
  43.       end if
  44.       set the visible of sprite (checkSprite + gHelpOffset) to 1
  45.       updateStage()
  46.     else
  47.       if not (the visible of sprite (checkSprite + gHelpOffset)) then
  48.         set the visible of sprite (checkSprite + gHelpOffset) to 1
  49.       end if
  50.       updateStage()
  51.     end if
  52.     set gLastRollover to checkSprite
  53.   else
  54.     if gLastRollover then
  55.       set the visible of sprite (gLastRollover + gHelpOffset) to 0
  56.       set gLastRollover to 0
  57.       set gSpriteName to 0
  58.     end if
  59.   end if
  60. end
  61.