home *** CD-ROM | disk | FTP | other *** search
/ GQ - Louise, World Cup, …remy Clarkson, Armageddon / GQCD.iso / files / startup.dxr / 00002_masterScript.ls < prev    next >
Encoding:
Text File  |  1998-05-21  |  4.2 KB  |  184 lines

  1. property myMovieName, cursorExemption, currentMovieName, myMasterApp, myWebPage, myReturnMovie, mySoftware
  2. global gvideo, greturnmovie, gSoundObj, gCustompath
  3.  
  4. on new me
  5.   set cursorExemption to 0
  6.   return me
  7. end
  8.  
  9. on setCursorExemption me, state
  10.   set cursorExemption to state
  11. end
  12.  
  13. on getCursorExemption me
  14.   return cursorExemption
  15. end
  16.  
  17. on autoUnloadMovie me
  18.   if not voidp(myMovieName) then
  19.     unloadMovie(myMovieName)
  20.   end if
  21.   set myMovieName to the movieName
  22. end
  23.  
  24. on autoLoad me, start, stop
  25.   cursor(4)
  26.   preloadMember(member start, stop)
  27.   cursor(-1)
  28. end
  29.  
  30. on autoPuppet me, start, stop
  31.   cursor(-1)
  32.   repeat with i = start to stop
  33.     puppetSprite(i, 1)
  34.   end repeat
  35. end
  36.  
  37. on autoNotPuppet me, start, stop
  38.   repeat with i = start to stop
  39.     puppetSprite(i, 0)
  40.   end repeat
  41. end
  42.  
  43. on playSound me, whichChannel, whichSound
  44.   puppetSound(whichChannel, 0)
  45.   puppetSound(whichChannel, member whichSound)
  46. end
  47.  
  48. on playVideo me, whichVid
  49.   set gvideo to whichVid
  50.   set greturnmovie to the movieName
  51.   autoGoMovie(me, "Movie5", 1, 1)
  52. end
  53.  
  54. on autoRollover me, startNum, endNum
  55.   repeat with i = startNum to endNum
  56.     if value(getID(me, i)) < 4 then
  57.       if rollOver(i) then
  58.         if the mouseDown then
  59.           cursor([2, 2])
  60.           set the member of sprite i to member (getName(me, i) & "3.PCT")
  61.         else
  62.           cursor([1, 2])
  63.           set the member of sprite i to member (getName(me, i) & "2.PCT")
  64.         end if
  65.         next repeat
  66.       end if
  67.       set the member of sprite i to member (getName(me, i) & "1.PCT")
  68.     end if
  69.   end repeat
  70.   if not cursorExemption and ((rollOver() < startNum) or (rollOver() > endNum)) then
  71.     cursor(-1)
  72.   end if
  73. end
  74.  
  75. on autoSwitchON me, spriteNum, startNum, endNum
  76.   if value(getID(me, spriteNum)) < 4 then
  77.     repeat with i = startNum to endNum
  78.       if i = spriteNum then
  79.         set the member of sprite i to member (getName(me, i) & "4.PCT")
  80.         next repeat
  81.       end if
  82.       if getID(me, i) < 5 then
  83.         set the member of sprite i to member (getName(me, i) & "1.pct")
  84.       end if
  85.     end repeat
  86.   end if
  87. end
  88.  
  89. on getName me, whichSprite
  90.   set myName to the name of the member of sprite whichSprite
  91.   return chars(myName, 1, the length of myName - 5)
  92. end
  93.  
  94. on getID me, whichSprite
  95.   set myName to the name of the member of sprite whichSprite
  96.   return chars(myName, the length of myName - 4, the length of myName - 4)
  97. end
  98.  
  99. on autoGoMovie me, whichMovie, blankMeFirst, fadeSoundOut
  100.   cursor(4)
  101.   set currentMovieName to whichMovie
  102.   set the actorList to []
  103.   append(the actorList, gSoundObj)
  104.   if fadeSoundOut then
  105.     playSoundTrack(gSoundObj, 0, 1, 255)
  106.   end if
  107.   if blankMeFirst then
  108.     autoNotPuppet(me, 1, 48)
  109.     go("exitBlank")
  110.   else
  111.     autoNotPuppet(me, 1, 41)
  112.     go(1, whichMovie)
  113.   end if
  114. end
  115.  
  116. on autoCustomwait me, seconds
  117.   set time to seconds * 60
  118.   set timerStart to the timer
  119.   repeat while (the timer - timerStart) < time
  120.     cursor(4)
  121.   end repeat
  122.   cursor(-1)
  123. end
  124.  
  125. on getMovieName me
  126.   return currentMovieName
  127. end
  128.  
  129. on setUpLink me, whichDoc, whichMovie
  130.   set myWebPage to whichDoc
  131.   set myReturnMovie to whichMovie
  132. end
  133.  
  134. on getMySoftware me
  135.   return mySoftware
  136. end
  137.  
  138. on getFrame me
  139.   return myWebPage
  140. end
  141.  
  142. on autoReturn me
  143.   autoGoMovie(me, myReturnMovie, 1, 1)
  144. end
  145.  
  146. on autoWebLink me
  147.   if not objectp(myMasterApp) then
  148.     openXLib(gCustompath & "MastrApp.dll")
  149.     set myMasterApp to MasterApp(mnew, "4ib97xhbf33a")
  150.     if not objectp(myMasterApp) then
  151.       alert("No object!")
  152.       return 
  153.     end if
  154.   end if
  155.   set theDocument to the pathName & "NetFiles\refresh.htm"
  156.   checkApplication(me, theDocument)
  157. end
  158.  
  159. on checkApplication me, whichDocument
  160.   set theApplication to myMasterApp(mLocateExecutable, whichDocument)
  161.   if stringp(theApplication) then
  162.     if word 1 of theApplication = "Error:" then
  163.       set mySoftware to 0
  164.     else
  165.       set myLength to the length of theApplication
  166.       if chars(theApplication, myLength - 3, myLength) = ".EXE" then
  167.         set mySoftware to theApplication
  168.       else
  169.         set mySoftware to 0
  170.       end if
  171.     end if
  172.   else
  173.     set mySoftware to 0
  174.   end if
  175. end
  176.  
  177. on shutDownWebLink me
  178.   if objectp(myMasterApp) then
  179.     myMasterApp(mdispose)
  180.     set myMasterApp to 0
  181.     closeXLib(gCustompath & "MastrApp.dll")
  182.   end if
  183. end
  184.