home *** CD-ROM | disk | FTP | other *** search
/ Car Screensaver - Toyota / TOYOTA.iso / mjparty / vivi_ex.exe / vivi_ex.DXR / 00001.ls next >
Encoding:
Text File  |  1996-05-13  |  2.0 KB  |  94 lines

  1. on startMovie
  2.   cursor(200)
  3.   set n to the colorDepth
  4.   if n < 8 then
  5.     go("16")
  6.     exit
  7.   end if
  8.   set the keyDownScript to "checkKey"
  9. end
  10.  
  11. on checkkey
  12.   set num to the frame
  13.   if not (the key = " ") then
  14.     exit
  15.   end if
  16.   if (num >= 46) and (num <= 49) then
  17.     go("upd")
  18.   else
  19.     exit
  20.   end if
  21. end
  22.  
  23. on stopMovie
  24.   set the keyDownScript to EMPTY
  25.   if the machineType <> 256 then
  26.     releaserearwindow()
  27.   end if
  28. end
  29.  
  30. on gonext
  31.   set the mouseDownScript to EMPTY
  32.   cursor(200)
  33.   sound stop 2
  34.   puppetSound(3, 99)
  35.   go(#next)
  36. end
  37.  
  38. on initrearwindow
  39.   global rwobj
  40.   if factory("MovieUtilities") = 0 then
  41.     openXLib(the pathName & "RearWindow.XObj")
  42.   end if
  43.   if objectp(rwobj) then
  44.     rwobj(mdispose)
  45.   end if
  46.   makeobjifneeded()
  47.   set retvalue to rwobj(mpattowindow, -5)
  48. end
  49.  
  50. on makeobjifneeded
  51.   global rwobj
  52.   if not objectp(rwobj) then
  53.     set rwobj to rearwindow(mnew, "M")
  54.     if value(rwobj) < 0 then
  55.       alert("System error" && rwobj && "trying to create the RearWindow object in RAM (multiple-monitor config).")
  56.       exit
  57.     end if
  58.     writestageandscreenbounds()
  59.     if the freeBlock < rwobj(mgetmemoryneeded) then
  60.       if objectp(rwobj) then
  61.         rwobj(mdispose)
  62.         set rwobj to rearwindow(mnew, "S")
  63.       end if
  64.       if value(rwobj) < 0 then
  65.         alert("System error" && rwobj && "trying to create the RearWindow object in RAM (single-monitor config).")
  66.         exit
  67.       end if
  68.       writestageandscreenbounds()
  69.     end if
  70.   end if
  71. end
  72.  
  73. on writestageandscreenbounds
  74.   global rwobj
  75.   set s to "Minimum Rect around All Screens:"
  76.   set s to s && rwobj(mgetscreentop) & ", "
  77.   set s to s && rwobj(mgetscreenleft) & ", "
  78.   set s to s && rwobj(mgetscreenbottom) & ", "
  79.   set s to s && rwobj(mgetscreenright) & RETURN
  80.   set s to s & "Stage dimensions are:"
  81.   set s to s && the stageTop & ", "
  82.   set s to s && the stageLeft & ", "
  83.   set s to s && the stageBottom & ", "
  84.   set s to s && the stageRight
  85. end
  86.  
  87. on releaserearwindow
  88.   global rwobj
  89.   if objectp(rwobj) then
  90.     rwobj(mdispose)
  91.   end if
  92.   closeXLib()
  93. end
  94.