home *** CD-ROM | disk | FTP | other *** search
/ Car Screensaver - Toyota / TOYOTA.iso / mjparty / qh_demo.exe / DEMOHNT1.DXR / 00002.ls < prev    next >
Encoding:
Text File  |  1996-08-09  |  1.5 KB  |  60 lines

  1. on exitFrame
  2.   global gsnd
  3.   set gsnd to the soundLevel
  4.   if gsnd = 0 then
  5.     set the soundLevel to 1
  6.   end if
  7.   if the machineType <> 256 then
  8.     initrearwindow()
  9.   end if
  10. end
  11.  
  12. on initrearwindow
  13.   global rwobj
  14.   if factory("MovieUtilities") = 0 then
  15.     openXLib(the pathName & "RearWindow.XObj")
  16.   end if
  17.   if objectp(rwobj) then
  18.     rwobj(mdispose)
  19.   end if
  20.   makeobjifneeded()
  21.   set retvalue to rwobj(mpattowindow, -5)
  22. end
  23.  
  24. on makeobjifneeded
  25.   global rwobj
  26.   if not objectp(rwobj) then
  27.     set rwobj to rearwindow(mnew, "M")
  28.     if value(rwobj) < 0 then
  29.       alert("System error" && rwobj && "trying to create the RearWindow object in RAM (multiple-monitor config).")
  30.       exit
  31.     end if
  32.     writestageandscreenbounds()
  33.     if the freeBlock < rwobj(mgetmemoryneeded) then
  34.       if objectp(rwobj) then
  35.         rwobj(mdispose)
  36.         set rwobj to rearwindow(mnew, "S")
  37.       end if
  38.       if value(rwobj) < 0 then
  39.         alert("System error" && rwobj && "trying to create the RearWindow object in RAM (single-monitor config).")
  40.         exit
  41.       end if
  42.       writestageandscreenbounds()
  43.     end if
  44.   end if
  45. end
  46.  
  47. on writestageandscreenbounds
  48.   global rwobj
  49.   set s to "Minimum Rect around All Screens:"
  50.   set s to s && rwobj(mgetscreentop) & ", "
  51.   set s to s && rwobj(mgetscreenleft) & ", "
  52.   set s to s && rwobj(mgetscreenbottom) & ", "
  53.   set s to s && rwobj(mgetscreenright) & RETURN
  54.   set s to s & "Stage dimensions are:"
  55.   set s to s && the stageTop & ", "
  56.   set s to s && the stageLeft & ", "
  57.   set s to s && the stageBottom & ", "
  58.   set s to s && the stageRight
  59. end
  60.