home *** CD-ROM | disk | FTP | other *** search
/ PC Direct 1995 September / PCD0995.ISO / files / demos / keroppiw / kp_begin.dir / 00001.ls next >
Encoding:
Text File  |  1994-12-12  |  1.2 KB  |  49 lines

  1. on startMovie
  2.   checkColor()
  3. end
  4.  
  5. on checkColor
  6.   if the colorDepth <> 8 then
  7.     set the colorDepth to 8
  8.     if the colorDepth <> 8 then
  9.       set colStr to "Sorry, Keroppi DayHopper requires 256 colors." & RETURN
  10.       put "Please contact your Apple dealer for information about a color system upgrade." after colStr
  11.       alert(colStr)
  12.       play done
  13.     end if
  14.   end if
  15. end
  16.  
  17. on doSolidColor colIndex
  18.   global FHobj
  19.   if (colIndex < 0) or (colIndex > 255) then
  20.     set colIndex to 0
  21.   end if
  22.   if objectp(FHobj) then
  23.     FHobj(mdispose)
  24.   end if
  25.   set FHobj to FinderHider(mnew)
  26.   FHobj(mSetBorderColor, colIndex)
  27.   FHobj(mUpdateBorder)
  28.   FHobj(mShowBorder, 1)
  29. end
  30.  
  31. on checkScreenSize
  32.   global screenSizeOBJ
  33.   if objectp(screenSizeOBJ) then
  34.     screenSizeOBJ(mdispose)
  35.   end if
  36.   set screenSizeOBJ to RearWindow(mnew, "S")
  37.   set resultCode to value(screenSizeOBJ)
  38.   if resultCode < 0 then
  39.     alert("System Error trying to use RearWindow XOBJ" && string(resultCode))
  40.   end if
  41.   set R to screenSizeOBJ(mGetScreenRight)
  42.   set B to screenSizeOBJ(mGetScreenBottom)
  43.   put R && B
  44.   if (R < 832) or (B < 624) then
  45.     alert("You need at least a 13 inch monitor to run the Keroppi DayHopper Demo.")
  46.     play done
  47.   end if
  48. end
  49.