home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1998 December / WPCDEC98.ISO / dxrs / files / startUp.dxr / 00003_videoScript.ls < prev    next >
Encoding:
Text File  |  1998-09-24  |  1.7 KB  |  88 lines

  1. property myVideoSprite, myVideoLength, myIntroFile, myVideoFile, myIntroText, myVideoText, myFrame
  2.  
  3. on new me
  4.   return me
  5. end
  6.  
  7. on setGoal me, whichGoal
  8.   set myFrame to whichGoal
  9. end
  10.  
  11. on getGoal me
  12.   return myFrame
  13. end
  14.  
  15. on initGoal me, whichSprite
  16.   set myVideoSprite to whichSprite
  17.   set myVideoLength to the duration of sprite(myVideoSprite)
  18.   playVideo(me)
  19. end
  20.  
  21. on setUpVideo me, whichIntro, whichFile, whichInText, whichOutText
  22.   set myIntroFile to whichIntro
  23.   set myVideoFile to whichFile
  24.   set myIntroText to whichInText
  25.   set myVideoText to whichOutText
  26. end
  27.  
  28. on intro me, whichSprite, whichTextSprite
  29.   set myVideoSprite to whichSprite
  30.   set myTextSprite to whichTextSprite
  31.   set the member of sprite myVideoSprite to member myIntroFile
  32.   set the member of sprite myTextSprite to member myIntroText
  33.   updateStage()
  34.   set myVideoLength to the duration of sprite(myVideoSprite)
  35.   playVideo(me)
  36. end
  37.  
  38. on init me, whichSprite
  39.   set myVideoSprite to whichSprite
  40.   set myVideoLength to the duration of sprite(myVideoSprite)
  41.   playVideo(me)
  42. end
  43.  
  44. on resetVideo me
  45.   set the movieTime of sprite myVideoSprite to 0
  46.   stopVideo(me)
  47. end
  48.  
  49. on videoAtStart me
  50.   if the movieTime of sprite myVideoSprite = 0 then
  51.     return 1
  52.   else
  53.     return 0
  54.   end if
  55. end
  56.  
  57. on videoFinished me
  58.   if the movieTime of sprite myVideoSprite = myVideoLength then
  59.     return 1
  60.   else
  61.     return 0
  62.   end if
  63. end
  64.  
  65. on videoStopped me
  66.   if the movieRate of sprite myVideoSprite = 0 then
  67.     return 1
  68.   else
  69.     return 0
  70.   end if
  71. end
  72.  
  73. on playVideo me
  74.   set the movieRate of sprite myVideoSprite to 1
  75. end
  76.  
  77. on rewindVideo me
  78.   set the movieRate of sprite myVideoSprite to -3
  79. end
  80.  
  81. on forwardVideo me
  82.   set the movieRate of sprite myVideoSprite to 3
  83. end
  84.  
  85. on stopVideo me
  86.   set the movieRate of sprite myVideoSprite to 0
  87. end
  88.