home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / optimus / agata / home.dir / 00001_start script.ls next >
Encoding:
Text File  |  1997-02-20  |  1.4 KB  |  62 lines

  1. on startMovie
  2.   global theCoord, visitList, startTime, firstTime, gPath
  3.   cursor(200)
  4.   set the keyDownScript to EMPTY
  5.   setPath("home")
  6.   if not voidp(visitList) then
  7.     set r to random(3)
  8.     sound playFile 3, "arrange" & r & ".aif"
  9.   end if
  10.   preLoadCast()
  11.   repeat with i = 4 to 40
  12.     puppetSprite(i, 1)
  13.   end repeat
  14.   puppetSprite(42, 1)
  15.   set the visible of sprite 42 to 0
  16.   set the stretch of sprite 42 to 0
  17.   set the castNum of sprite 39 to 0
  18.   set startTime to the ticks / 60
  19.   if voidp(firstTime) then
  20.     set firstTime to 1
  21.   else
  22.     set firstTime to 0
  23.   end if
  24.   set theCoord to birth(script "coordinator")
  25.   set the timeoutLength to 240
  26.   set the timeoutScript to "activateBol theCoord"
  27. end
  28.  
  29. on stopMovie
  30.   sound stop 1
  31.   sound stop 2
  32.   sound stop 3
  33.   sound stop 4
  34.   set the keyDownScript to EMPTY
  35.   killPath("home")
  36. end
  37.  
  38. on setPath module
  39.   global gPath, gCDPath
  40.   if gCDPath <> gPath then
  41.     if the machineType = 256 then
  42.       append(the searchPath, gCDPath & module & "\")
  43.     else
  44.       append(the searchPath, gCDPath & module & ":")
  45.     end if
  46.   end if
  47. end
  48.  
  49. on killPath module
  50.   global gPath, gCDPath
  51.   if gCDPath <> gPath then
  52.     if the machineType = 256 then
  53.       set pos to getPos(the searchPath, gCDPath & module & "\")
  54.     else
  55.       set pos to getPos(the searchPath, gCDPath & module & ":")
  56.     end if
  57.     if pos > 0 then
  58.       deleteAt(the searchPath, pos)
  59.     end if
  60.   end if
  61. end
  62.