home *** CD-ROM | disk | FTP | other *** search
/ Roboty / ROBOTS_CD.iso / qtchecker.dxr / 00003.ls < prev    next >
Encoding:
Text File  |  2005-04-28  |  2.1 KB  |  100 lines

  1. global Del, gPlatform, allowContinue, gI_have_QT, PathToInstaller, CheckForQuicktime, userDisplay, glang
  2.  
  3. on prepareMovie me
  4.   BuddyReg = baRegister("North Creative", 3705836)
  5.   userDisplay = []
  6. end
  7.  
  8. on startMovie
  9.   Del = the last char in the pathname
  10.   allowContinue = 0
  11.   CheckForQuicktime = 1
  12.   glang = "pol"
  13.   PlatformType()
  14. end
  15.  
  16. on whatLanguage
  17.   FolderList = baFolderList(the pathname & "version")
  18.   if count(FolderList) = 1 then
  19.     glang = FolderList[1]
  20.   else
  21.     alert("Error - glang set to 'eng'")
  22.     glang = "eng"
  23.   end if
  24. end
  25.  
  26. on CheckForQuicktimeVersion
  27.   if CheckForQuicktime then
  28.     member("system").text = gPlatform && string(QuickTimeVersion())
  29.     if QuickTimeVersion() >= 5 then
  30.       gI_have_QT = 1
  31.       ContinueOn()
  32.     else
  33.       gI_have_QT = 0
  34.       Warning()
  35.     end if
  36.   else
  37.     gI_have_QT = 1
  38.     ContinueOn()
  39.   end if
  40. end
  41.  
  42. on PlatformType
  43.   gPlatform = "PC"
  44.   if the applicationName contains "Classic" then
  45.     gPlatform = "Classic"
  46.   end if
  47.   if the applicationName contains "OSX" then
  48.     gPlatform = "OSX"
  49.   end if
  50.   case gPlatform of
  51.     "PC":
  52.       PathToInstaller = the pathname & "QuickTime\win\QuickTimeInstaller.exe"
  53.     "Classic":
  54.       PathToInstaller = the pathname & "QuickTime:mac:QuickTime Installer"
  55.     "OSX":
  56.       PathToInstaller = the pathname & "QuickTime:mac:QuickTimeInstallerX.dmg"
  57.   end case
  58. end
  59.  
  60. on ContinueOn
  61.   if the keyPressed = "q" then
  62.     gI_have_QT = 0
  63.     Warning()
  64.   else
  65.     go("go")
  66.     play movie the pathname & "CD" & Del & "main"
  67.   end if
  68. end
  69.  
  70. on Warning
  71.   member("system").text = member("system").text && PathToInstaller
  72.   go(gPlatform && "warning")
  73. end
  74.  
  75. on ButtonEvent theEvent
  76.   case theEvent of
  77.     "Continue":
  78.       ContinueOn()
  79.     "Quit":
  80.       quit()
  81.     "Install":
  82.       if (gPlatform = "classic") or (gPlatform = "PC") then
  83.         open(PathToInstaller)
  84.       end if
  85.       if gPlatform = "OSX" then
  86.         openPKG = baOpenFile(PathToInstaller, "Normal")
  87.       end if
  88.       quit()
  89.   end case
  90. end
  91.  
  92. on canIshow myName, spNum
  93.   case myName of
  94.     "Continue_Mask":
  95.       sprite(spNum).visible = not allowContinue
  96.     "Continue":
  97.       sprite(spNum).visible = allowContinue
  98.   end case
  99. end
  100.