home *** CD-ROM | disk | FTP | other *** search
/ Shocking The Web CD-ROM / SHOCK_CD.ISO / pc / tutorial / casestdy / ch11_sfx / esnavbar.dir / 00002.ls < prev    next >
Encoding:
Text File  |  1996-11-12  |  1.7 KB  |  77 lines

  1. on localInit
  2.   global gBaseURL, gNextPage
  3.   repeat with i = 16 to 19
  4.     set the visible of sprite i to 0
  5.   end repeat
  6.   repeat with i = 22 to 33
  7.     set the visible of sprite i to 0
  8.   end repeat
  9.   set gNextPage to EMPTY
  10. end
  11.  
  12. on enterFrame
  13.   checkRollovers()
  14. end
  15.  
  16. on checkRollovers
  17.   global gLastRollTime, gLastRollover, gBubbleSprite, gBubble
  18.   repeat with i = 6 to 9
  19.     if rollOver(i) and the visible of sprite i then
  20.       if i = gLastRollover then
  21.         if the mouseUp and ((gLastRollTime + 50) < the timer) and not gBubble then
  22.           set gLastRollTime to 0
  23.           puppetSound("switches1")
  24.           set gBubbleSprite to 22 + ((i - 6) * 3)
  25.           doBubbles(1, gBubbleSprite)
  26.         end if
  27.         exit
  28.       else
  29.         if gBubble then
  30.           doBubbles(0, gBubbleSprite)
  31.         end if
  32.         set gLastRollTime to the timer
  33.       end if
  34.       set gLastRollover to i
  35.       exit
  36.     end if
  37.   end repeat
  38.   set gLastRollover to 0
  39.   if gBubble then
  40.     doBubbles(0, gBubbleSprite)
  41.   end if
  42. end
  43.  
  44. on doBubbles op, startSprite
  45.   global gBubble
  46.   repeat with j = startSprite to startSprite + 2
  47.     set the visible of sprite j to op
  48.   end repeat
  49.   updateStage()
  50.   set gBubble to op
  51. end
  52.  
  53. on hiliteLoc
  54.   global gNextPage
  55.   repeat with i = 6 to 9
  56.     if gNextPage contains the name of cast the castNum of sprite i then
  57.       set the visible of sprite (i + 10) to 1
  58.       next repeat
  59.     end if
  60.     set the visible of sprite (i + 10) to 0
  61.   end repeat
  62. end
  63.  
  64. on setBGColor
  65.   set theLabel to getCurrLabel()
  66.   if theLabel contains "about" then
  67.     set bgColor to 0
  68.   else
  69.     if theLabel contains "sampl" then
  70.       set bgColor to 157
  71.     else
  72.       set bgColor to 5
  73.     end if
  74.   end if
  75.   set the stageColor to bgColor
  76. end
  77.