home *** CD-ROM | disk | FTP | other *** search
/ Our World is a Playground 3 / 0_firefly3.iso / pc / files / open.dxr / 00158.ls < prev    next >
Encoding:
Text File  |  1996-08-17  |  5.5 KB  |  159 lines

  1. global gTransPath, gFileList, myXObj, gBootName, gPaintPath, gCDFilesPath, gWin31Tag
  2.  
  3. on startMovie
  4.   set handCursor to [the number of member "Pointer", the number of member "Mask"]
  5.   cursor(handCursor)
  6.   set the mouseDownScript to "dontPassEvent"
  7.   set the mouseUpScript to "dontPassEvent"
  8.   if the colorDepth <> 8 then
  9.     alert("Please set your monitor to display 256 colors")
  10.     quit()
  11.   end if
  12.   set gCDFilesPath to the moviePath
  13.   set gFileList to [#LPtheme, #Tanzania, #England, #Sweden, #Austrlia, #Japan, #Germany, #India, #Spain, #Brazil]
  14.   if the machineType <> 256 then
  15.     if objectp(myXObj) then
  16.       myXObj(mdispose)
  17.     end if
  18.     openXLib(the moviePath & "Xtras:misc_x Xobj")
  19.     set myXObj to misc_x(mnew)
  20.     set gBootName to myXObj(mBootname)
  21.     set gTransPath to gBootName & ":Pretend:LP3Trans:"
  22.     set gPaintPath to gBootName & ":Pretend:LP3Paint:"
  23.     if myXObj(mFileExists, gTransPath & "LPTheme.aif") = 0 then
  24.       copyMusic(#Mac)
  25.     end if
  26.     if myXObj(mFileExists, gPaintPath & "paint3.dxr") = 0 then
  27.       copyPaint(#Mac)
  28.     end if
  29.     if myXObj(mFileExists, gPaintPath & "Xtras:fill xobj") = 0 then
  30.       copyXtras(#Mac)
  31.     end if
  32.     if objectp(myXObj) then
  33.       myXObj(mdispose)
  34.     end if
  35.     closeXLib(the moviePath & "Xtras:misc_x Xobj")
  36.   else
  37.     if objectp(myXObj) then
  38.       myXObj(mdispose)
  39.     end if
  40.     openXLib(the moviePath & "Xtras\misc_x.dll")
  41.     set myXObj to misc_x(mnew)
  42.     set gTransPath to "C:\Pretend\LP3Trans\"
  43.     set gPaintPath to "C:\Pretend\LP3Paint\"
  44.     if myXObj(mFileExists, gTransPath & "LPTheme.aif") = 0 then
  45.       copyMusic(#PC)
  46.     end if
  47.     if myXObj(mFileExists, gPaintPath & "paint3.dxr") = 0 then
  48.       copyPaint(#PC)
  49.     end if
  50.     if myXObj(mFileExists, gPaintPath & "Xtras\fill.dll") = 0 then
  51.       copyXtras(#PC)
  52.     end if
  53.     if objectp(myXObj) then
  54.       myXObj(mdispose)
  55.     end if
  56.     closeXLib(the moviePath & "Xtras\misc_x.dll")
  57.   end if
  58.   preLoadCast()
  59.   puppetSprite(8, 0)
  60. end
  61.  
  62. on stopMovie
  63.   repeat with i = 1 to 48
  64.     set the visible of sprite i to 1
  65.     set the blend of sprite i to 100
  66.   end repeat
  67. end
  68.  
  69. on blendSprite whichSprite, direction, howFast
  70.   if direction = #in then
  71.     set the blend of sprite whichSprite to 0
  72.     set the visible of sprite whichSprite to 1
  73.     repeat while the blend of sprite whichSprite < 100
  74.       set the blend of sprite whichSprite to the blend of sprite whichSprite + howFast
  75.       updateStage()
  76.     end repeat
  77.   else
  78.     repeat while the blend of sprite whichSprite > 0
  79.       set the blend of sprite whichSprite to the blend of sprite whichSprite - howFast
  80.       updateStage()
  81.     end repeat
  82.     set the visible of sprite whichSprite to 0
  83.   end if
  84. end
  85.  
  86. on wait howLong
  87.   startTimer()
  88.   repeat while (the timer < howLong) and (the mouseDown = 0)
  89.     nothing()
  90.   end repeat
  91. end
  92.  
  93. on copyMusic whichPlat
  94.   puppetSprite(8, 1)
  95.   set the loc of sprite 8 to point(318, 273)
  96.   updateStage()
  97.   set howManyFiles to count(gFileList)
  98.   if whichPlat = #Mac then
  99.     if (myXObj(mSpaceOnVol, gBootName) / 1024 / 1024) < 5 then
  100.       alert("Let's Pretend 3 requires a minimum of 5 megabytes             of free hard drive space.  Please  make more space             available on your hard drive and try again.")
  101.       quit()
  102.     end if
  103.     repeat with i = 1 to howManyFiles
  104.       set whichFile to string(getAt(gFileList, i)) & ".aif"
  105.       myXObj(mCopyFile, the moviePath & "LP3Trans:" & whichFile, gTransPath & whichFile)
  106.       if i > 2 then
  107.         set the memberNum of sprite 8 to the memberNum of sprite 8 + 1
  108.       end if
  109.       updateStage()
  110.     end repeat
  111.   else
  112.     if (myXObj(mSpaceOnVol, "C:\") / 1024 / 1024) < 5 then
  113.       alert("Let's Pretend 3 requires a minimum of 5 megabytes             of free hard drive space.  Please make more space              available on your hard drive and try again.")
  114.       quit()
  115.     end if
  116.     if myXObj(mInsureFolder, gTransPath) = 0 then
  117.       repeat with i = 1 to howManyFiles
  118.         set whichFile to string(getAt(gFileList, i)) & ".aif"
  119.         myXObj(mCopyFile, the moviePath & "LP3Trans\" & whichFile, gTransPath & whichFile)
  120.         if i > 2 then
  121.           set the memberNum of sprite 8 to the memberNum of sprite 8 + 1
  122.         end if
  123.         updateStage()
  124.       end repeat
  125.     end if
  126.   end if
  127. end
  128.  
  129. on copyPaint whichPlat
  130.   if whichPlat = #Mac then
  131.     myXObj(mCopyFile, the moviePath & "LP3Paint:paint3.dxr", gPaintPath & "paint3.dxr")
  132.   else
  133.     if myXObj(mInsureFolder, gPaintPath) = 0 then
  134.       myXObj(mCopyFile, the moviePath & "LP3Paint\paint3.dxr", gPaintPath & "paint3.dxr")
  135.     end if
  136.   end if
  137.   set the memberNum of sprite 8 to the memberNum of sprite 8 + 1
  138.   updateStage()
  139. end
  140.  
  141. on copyXtras whichPlat
  142.   if whichPlat = #Mac then
  143.     myXObj(mCopyFile, the moviePath & "Xtras:Fill XObj", gPaintPath & "Xtras:Fill XObj")
  144.     myXObj(mCopyFile, the moviePath & "Xtras:PrintoMatic_Lite", gPaintPath & "Xtras:PrintOMatic_Lite")
  145.     myXObj(mCopyFile, the moviePath & "Xtras:ScrnUtil 1.0.3", gPaintPath & "Xtras:ScrnUtil 1.0.3")
  146.   else
  147.     if myXObj(mInsureFolder, gPaintPath & "Xtras") = 0 then
  148.       myXObj(mCopyFile, the moviePath & "Xtras\Fill.dll", gPaintPath & "Xtras\Fill.dll")
  149.       if gWin31Tag then
  150.         myXObj(mCopyFile, the moviePath & "Xtras\POMlite.x16", gPaintPath & "Xtras\POMLite.x16")
  151.         myXObj(mCopyFile, the moviePath & "Xtras\ScrnUtil.x16", gPaintPath & "Xtras\ScrnUtil.x16")
  152.       else
  153.         myXObj(mCopyFile, the moviePath & "Xtras\POMlite.x32", gPaintPath & "Xtras\POMlite.x32")
  154.         myXObj(mCopyFile, the moviePath & "Xtras\ScrnUtil.x32", gPaintPath & "Xtras\ScrnUtil.x32")
  155.       end if
  156.     end if
  157.   end if
  158. end
  159.