home *** CD-ROM | disk | FTP | other *** search
/ GQ - Louise, World Cup, …remy Clarkson, Armageddon / GQCD.iso / files / startup.dxr / 00003_videoScript.ls < prev    next >
Encoding:
Text File  |  1998-05-21  |  1.9 KB  |  92 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, whichTextSprite
  39.   set myVideoSprite to whichSprite
  40.   set myTextSprite to whichTextSprite
  41.   set the member of sprite myVideoSprite to member myVideoFile
  42.   set the member of sprite myTextSprite to member myVideoText
  43.   updateStage()
  44.   set myVideoLength to the duration of sprite(myVideoSprite)
  45.   playVideo(me)
  46. end
  47.  
  48. on resetVideo me
  49.   set the movieTime of sprite myVideoSprite to 0
  50.   stopVideo(me)
  51. end
  52.  
  53. on videoAtStart me
  54.   if the movieTime of sprite myVideoSprite = 0 then
  55.     return 1
  56.   else
  57.     return 0
  58.   end if
  59. end
  60.  
  61. on videoFinished me
  62.   if the movieTime of sprite myVideoSprite = myVideoLength then
  63.     return 1
  64.   else
  65.     return 0
  66.   end if
  67. end
  68.  
  69. on videoStopped me
  70.   if the movieRate of sprite myVideoSprite = 0 then
  71.     return 1
  72.   else
  73.     return 0
  74.   end if
  75. end
  76.  
  77. on playVideo me
  78.   set the movieRate of sprite myVideoSprite to 1
  79. end
  80.  
  81. on rewindVideo me
  82.   set the movieRate of sprite myVideoSprite to -3
  83. end
  84.  
  85. on forwardVideo me
  86.   set the movieRate of sprite myVideoSprite to 3
  87. end
  88.  
  89. on stopVideo me
  90.   set the movieRate of sprite myVideoSprite to 0
  91. end
  92.