home *** CD-ROM | disk | FTP | other *** search
/ DigitalVision: Cats & Dogs / DigitalVision: Cats & Dogs - Disc 1.iso / pc / s_saver / dv_onlin.exe / dv_onlin.dcr / Internal_2_go the frame - idle.ls < prev    next >
Encoding:
Text File  |  2000-07-28  |  1.5 KB  |  75 lines

  1. property pTimeout, pDelay, pMouseLoc, pMode, ancestor, pIdle
  2.  
  3. on beginSprite me
  4.   puppetSound(1, "bg01")
  5.   ancestor = new(script("scroller script"))
  6.   pMouseLoc = point(-100, -100)
  7.   pTimeout = the timer + (60 * 5)
  8.   pMode = #anim
  9.   pIdle = 0
  10. end
  11.  
  12. on exitFrame me
  13.   go(the frame)
  14. end
  15.  
  16. on idle me
  17.   me.timeoutcheck()
  18.   go(the frame)
  19. end
  20.  
  21. on CuePassed whichChannel, cuePointNumber, cuePointName
  22.   num = random(17)
  23.   if num > 9 then
  24.     exit
  25.   end if
  26.   tsound = "fg" & num
  27.   makesound(2, tsound)
  28. end
  29.  
  30. on timeoutcheck me
  31.   if pTimeout > the timer then
  32.     if the mouseLoc = pMouseLoc then
  33.       me.theidle()
  34.       cursor(200)
  35.       pIdle = 1
  36.     else
  37.       ancestor.Run(#mouse)
  38.       if pIdle <> 0 then
  39.         sendAllSprites(#animswitch, 0)
  40.         thecursor(#norm)
  41.         pIdle = 0
  42.       end if
  43.     end if
  44.   else
  45.     pTimeout = the timer + (60 * 5)
  46.     pMouseLoc = the mouseLoc
  47.   end if
  48. end
  49.  
  50. on theidle me
  51.   if pDelay < the timer then
  52.     case pMode of
  53.       #zoom:
  54.         sendSprite(random(22) + 60, #mouseEnter)
  55.         sendAllSprites(#animswitch, 0)
  56.         pMode = #anim
  57.         pDelay = the timer + (5 * 60)
  58.       otherwise:
  59.         sendAllSprites(#zoom_out)
  60.         sendAllSprites(#animswitch, 1)
  61.         pMode = #zoom
  62.         pDelay = the timer + (6 * 60)
  63.     end case
  64.   else
  65.     case pMode of
  66.       #anim:
  67.         h = sin(the timer / 50.00999999999999801) * 1000.00999999999999091
  68.         ancestor.Run(h)
  69.       #zoom:
  70.         h = #pause
  71.         ancestor.Run(h)
  72.     end case
  73.   end if
  74. end
  75.