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

  1. property myMovieName, cursorExemption, currentMovieName, myMasterApp, myWebPage, myReturnMovie, mySoftware
  2. global gvideo, greturnmovie, gSoundObj, gCustompath, gVideoObj
  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, whichReturn
  49.   set gvideo to whichVid
  50.   if not voidp(whichReturn) then
  51.     set greturnmovie to whichReturn
  52.   else
  53.     set greturnmovie to the movieName
  54.   end if
  55.   autoGoMovie(me, "Movie5", 1, 1)
  56. end
  57.  
  58. on autoRollover me, startNum, endNum
  59.   repeat with i = startNum to endNum
  60.     if value(getID(me, i)) < 4 then
  61.       if rollOver(i) then
  62.         setCursorExemption(me, 1)
  63.         if the mouseDown then
  64.           cursor([2, 2])
  65.           set the member of sprite i to member (getName(me, i) & "3")
  66.         else
  67.           cursor([1, 2])
  68.           set the member of sprite i to member (getName(me, i) & "2")
  69.         end if
  70.         next repeat
  71.       end if
  72.       set the member of sprite i to member (getName(me, i) & "1")
  73.     end if
  74.   end repeat
  75.   if (rollOver() < startNum) or (rollOver() > endNum) then
  76.     setCursorExemption(me, 0)
  77.   end if
  78. end
  79.  
  80. on autoSwitchON me, spriteNum, startNum, endNum
  81.   if value(getID(me, spriteNum)) < 5 then
  82.     repeat with i = startNum to endNum
  83.       if i = spriteNum then
  84.         set the member of sprite i to member (getName(me, i) & "5")
  85.         next repeat
  86.       end if
  87.       if getID(me, i) < 6 then
  88.         set the member of sprite i to member (getName(me, i) & "0")
  89.       end if
  90.     end repeat
  91.   end if
  92. end
  93.  
  94. on autoSwitchOff me, startNum, endNum
  95.   repeat with i = startNum to endNum
  96.     if getID(me, i) < 6 then
  97.       set the member of sprite i to member (getName(me, i) & "0")
  98.     end if
  99.   end repeat
  100. end
  101.  
  102. on getName me, whichSprite
  103.   set myName to the name of the member of sprite whichSprite
  104.   return chars(myName, 1, the length of myName - 1)
  105. end
  106.  
  107. on getID me, whichSprite
  108.   set myName to the name of the member of sprite whichSprite
  109.   return chars(myName, the length of myName, the length of myName)
  110. end
  111.  
  112. on autoGoMovie me, whichMovie, blankMeFirst, fadeSoundOut
  113.   cursor(4)
  114.   set currentMovieName to whichMovie
  115.   set the actorList to []
  116.   append(the actorList, gSoundObj)
  117.   if fadeSoundOut then
  118.     playSoundTrack(gSoundObj, 0, 1, 255)
  119.   end if
  120.   if blankMeFirst and (the colorDepth < 16) then
  121.     autoNotPuppet(me, 1, 48)
  122.     go("exitBlank")
  123.   else
  124.     autoNotPuppet(me, 1, 41)
  125.     go(1, whichMovie)
  126.   end if
  127. end
  128.  
  129. on autoCustomwait me, seconds
  130.   set time to seconds * 60
  131.   set timerStart to the timer
  132.   repeat while (the timer - timerStart) < time
  133.     cursor(4)
  134.   end repeat
  135.   cursor(-1)
  136. end
  137.  
  138. on getMovieName me
  139.   return currentMovieName
  140. end
  141.  
  142. on openNetPage me, whichURL
  143.   set myBrowser to browserName()
  144.   set total to the length of myBrowser
  145.   if chars(myBrowser, total - 3, total) <> ".EXE" then
  146.     if userComplies(me) then
  147.       set myFileIO to new(xtra("FileIO"))
  148.       setFilterMask(myFileIO, "Executable (*.exe), *.exe")
  149.       set myBrowser to displayOpen(myFileIO)
  150.       if myBrowser <> EMPTY then
  151.         browserName(myBrowser)
  152.         browserName(#enabled, 1)
  153.         gotoNetPage(whichURL)
  154.       end if
  155.     end if
  156.   else
  157.     browserName(#enabled, 1)
  158.     gotoNetPage(whichURL)
  159.   end if
  160. end
  161.  
  162. on userComplies me
  163.   set myMuiObj to new(xtra("Mui"))
  164.   set myTitle to "Find Browser"
  165.   set myMessage to "Your default internet browser is not located in the place specified in your system directory, would you like to locate your browser?"
  166.   set alertInitList to [#Buttons: #OkCancel, #title: myTitle, #message: myMessage, #Icon: #caution, #movable: 1]
  167.   set buttonResult to alert(myMuiObj, alertInitList)
  168.   if buttonResult = 1 then
  169.     return 1
  170.   else
  171.     return 0
  172.   end if
  173. end
  174.