home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation: Maxed Out / Next_Generation_Nov_1996_Demo_Disc.iso / pc / start31.exe / start31.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  1996-09-12  |  2.5 KB  |  99 lines

  1. on startMovie
  2.   set the volume of sound 1 to 255
  3.   set the volume of sound 2 to 255
  4.   if the quickTimePresent = 1 then
  5.     go("begin")
  6.   else
  7.     go("QTNO")
  8.   end if
  9. end
  10.  
  11. on fileExists fileName
  12.   set filefound to 0
  13.   set curpath to getpath(fileName)
  14.   repeat with index = 1 to 1000
  15.     set curfile to getNthFileNameInFolder(curpath & "\", index)
  16.     if curfile = EMPTY then
  17.       set filefound to 0
  18.       exit repeat
  19.     end if
  20.     put fileName, curpath & curfile
  21.     if fileName = (curpath & "\" & curfile) then
  22.       set filefound to 1
  23.       exit repeat
  24.     end if
  25.   end repeat
  26.   return filefound
  27. end
  28.  
  29. on getdrive
  30.   if the machineType < 256 then
  31.     set volumetext to OSVolumeList()
  32.     set vollist to cvtTextToList(me, volumetext)
  33.   else
  34.     set vollist to []
  35.     repeat with index = 3 to 26
  36.       set drive to numToChar(64 + index) & ":\"
  37.       add(vollist, drive)
  38.     end repeat
  39.     add(vollist, EMPTY)
  40.   end if
  41.   if the machineType = 256 then
  42.     set filesep to "\"
  43.   else
  44.     set filesep to ":"
  45.   end if
  46.   set drive to EMPTY
  47.   repeat with volume in vollist
  48.     if fileExists(volume & "Media\Main.dxr") then
  49.       set drive to volume
  50.       exit repeat
  51.     end if
  52.   end repeat
  53.   if drive = EMPTY then
  54.     alert("Your CD could not be found. Please insert it into the drive and try again.")
  55.     return 0
  56.   else
  57.     return drive
  58.   end if
  59. end
  60.  
  61. on jumpMovie moviePath
  62.   global numtries
  63.   set numtries to numtries + 1
  64.   set drive to getdrive()
  65.   if stringp(drive) then
  66.     go(1, drive & moviePath)
  67.   else
  68.     if numtries < 3 then
  69.       jumpMovie(moviePath)
  70.     else
  71.       alert("The Next Generation CD could not be found. This program will now quit as gracefully as possible under the circumstances, though you should really try to get a copy of the Next Generation CD because it contains some truly cool stuff.")
  72.       halt()
  73.     end if
  74.   end if
  75. end
  76.  
  77. on launch moviePath
  78.   global numtries
  79.   set drive to getdrive()
  80.   if stringp(drive) then
  81.     open(drive & moviePath)
  82.   else
  83.     if numtries = 1 then
  84.       open(moviePath)
  85.     else
  86.       alert("The Next Generation CD could not be found. This program will now quit as gracefully as possible under the circumstances, though you should really try to get a copy of the Next Generation CD because it contains some truly cool stuff.")
  87.       halt()
  88.     end if
  89.   end if
  90. end
  91.  
  92. on getpath fileName
  93.   set olddelimiter to the itemDelimiter
  94.   set the itemDelimiter to "\"
  95.   set newpath to item 1 to the number of items in fileName - 1 of fileName
  96.   set the itemDelimiter to olddelimiter
  97.   return newpath
  98. end
  99.