home *** CD-ROM | disk | FTP | other *** search
/ Enter 2003: The Beautiful Scenery / enter-parhaat-2003.iso / files / frendz.exe / frendz.dcr / Scripts_42_b_IntermisionLoop.ls < prev    next >
Encoding:
Text File  |  2002-12-31  |  1.4 KB  |  70 lines

  1. property pPlay, pAnimationOver, pTicks
  2. global gInterAni, gMessageBox, gPause, gSoundEnabled, gStopURL
  3.  
  4. on beginSprite me
  5.   pPlay = 1
  6.   pAnimationOver = 0
  7.   pTicks = 0
  8.   sprite(86).loc = point(63, 115)
  9. end
  10.  
  11. on enterFrame me
  12.   if pPlay = 1 then
  13.     theFrame = playFlashAnimation(gInterAni, 84, gSoundEnabled)
  14.     moveAniHotSpot(theFrame)
  15.     pPlay = 0
  16.   end if
  17. end
  18.  
  19. on moveAniHotSpot theFrame
  20.   n = gInterAni[1].getPos(theFrame)
  21.   if (n = 3) or (n = 5) then
  22.     sprite(86).loc = point(63, 142)
  23.   else
  24.     sprite(86).loc = point(63, 115)
  25.   end if
  26. end
  27.  
  28. on exitFrame me
  29.   if pAnimationOver = 1 then
  30.     if gPause = 0 then
  31.       pTicks = pTicks + 1
  32.       if pTicks = 60 then
  33.         gMessageBox.mb_BoxSize(point(-200, 51), point(-200, 51), point(-200, 51))
  34.         gMessageBox.mb_text(EMPTY)
  35.         sprite(83).locH = -200
  36.         sound(2).play(member("s_mouseDown"))
  37.         go("Game")
  38.       end if
  39.     end if
  40.     go(the frame)
  41.   else
  42.     go(the frame)
  43.   end if
  44.   theFrame = EMPTY
  45.   case the keyPressed of
  46.     "1":
  47.       theFrame = "wave"
  48.     "2":
  49.       theFrame = "pop"
  50.     "3":
  51.       theFrame = "chase"
  52.     "4":
  53.       theFrame = "slide"
  54.     "5":
  55.       theFrame = "dance"
  56.   end case
  57.   if theFrame <> EMPTY then
  58.     sprite(84).goToFrame(theFrame)
  59.     moveAniHotSpot(theFrame)
  60.     updateStage()
  61.     sprite(84).play()
  62.   end if
  63. end
  64.  
  65. on flashAnimation me, Animation
  66.   case Animation of
  67.     "end":
  68.   end case
  69. end
  70.