home *** CD-ROM | disk | FTP | other *** search
/ Mobiclic 41 / MOBICLIC41.ISO / pc / Data / INTRO.DIR / 00031_Script_31 < prev    next >
Text File  |  2002-02-07  |  7KB  |  189 lines

  1. on prepareMovie
  2.   --  case(the platform contains ("Win")) of
  3.   --    1:
  4.   --      DmPack1Reg("74246")
  5.   --      DmPack2Reg("355181")
  6.   --      DmXTremePackReg("274943")
  7.   --    0:
  8.   --      DmPack1Reg("65258")
  9.   --      DmPack2Reg("346193")
  10.   --      DmXTremePackReg("265955")
  11.   --  end case
  12. end
  13. ----------------------------
  14. on startMovie
  15.   -- chargement des xtras
  16.   chargeXtras
  17.   -- enregistrement des xtras
  18.   if the machineType=256 then
  19.     OK = baSaveRegistration("MILAN PRESSE", 2868605)
  20.   end if
  21.   register(xtra "PrintOMatic","PMAT162-964-29318")
  22.   -- crΘation Θventuelle des dossiers de prefs -------------------------------
  23.   -- nouveautΘ de Mobiclic 33 ------------------------------------------------
  24.   creationRepertoires
  25.   --  installationVideos
  26.   -- test des couleurs de l'Θcran
  27.   global nbCouleurs
  28.   nbCouleurs = the colorDepth
  29.   case the machineType of
  30.     256 :-- la machine est un PC
  31.       if the colorDepth < 8 then
  32.         alert field "alerte2"
  33.         quit
  34.       else
  35.         if the colorDepth=8 then
  36.           alert field "alerte" 
  37.         end if
  38.       end if
  39.     otherwise :-- la machine est un Mac
  40.       if the colorDepth=8 then
  41.         alert field "alerte" 
  42.       end if
  43.   end case
  44.   -- zapper l'intro
  45.   if the optionDown=1 then
  46.     go to movie "sommaire"
  47.   end if
  48. end startMovie
  49.  
  50. on mouseUp
  51.   filmSuivant
  52. end mouseUp
  53.  
  54. on filmSuivant
  55.   sound close 2
  56.   if quickTimeVersion()<5 then
  57.     go to movie "linstal"
  58.   else
  59.     go to movie "sommaire"
  60.   end if
  61. end
  62.  
  63. on joueSon nom, n
  64.   if the machineType = 256 then
  65.     repeat with i=1 to the number of chars of nom
  66.       if char i of nom = ":" then
  67.         put "\" into char i of nom
  68.       end if
  69.     end repeat
  70.   end if
  71.   put the pathName & nom & ".aif" into nom
  72.   sound playFile n, nom
  73. end joueSon
  74.  
  75.  
  76. on chargeXtras
  77.   set p = the platform
  78.   case p of
  79.     "Windows,32": -- windows 95 et 98
  80.       openXlib the pathName & "xtras\Win32\budapi.x32"
  81.       openXlib the pathName & "xtras\Win32\PMatic.x32"
  82.       openXlib the pathName & "xtras\Win32\FileIo.x32"
  83.       openXlib the pathName & "xtras\Win32\Sound Import Export.x32" 
  84.       openXlib the pathName & "xtras\Win32\infonts.x32" 
  85.     otherWise:-- macintosh
  86.       openXlib the pathName & "xtras:Mac:Buddy API Xtra"
  87.       openXlib the pathName & "xtras:Mac:PMatic"
  88.       openXlib the pathName & "xtras:Mac:FileIO PPC Xtra"
  89.       openXlib the pathName & "xtras:Mac:Sound Import Export" 
  90.       openXlib the pathName & "xtras:Mac:InstalledFonts Xtra"    
  91.   end case
  92. end
  93.  
  94. on creationRepertoires
  95.   rdm = field "repDuMois"
  96.   case the machineType of
  97.     256 : -- la machine est un PC --------------------------------------------------------
  98.       repertoire = baSysFolder("windows") & "MilanPresse"
  99.       OK = baFolderExists(repertoire)
  100.       if OK=0 then
  101.         -- toute l'arborescence doit Ωtre crΘΘe
  102.         baCreateFolder(repertoire)
  103.         repMilan = the PathName & "Install\MilanPresse"
  104.         XCopyDirectory(repMilan,repertoire)
  105.       else
  106.         -- le rΘpertoire Mobiclic est-il prΘsent ?
  107.         repertoire = baSysFolder("windows") & "MilanPresse\Mobiclic"
  108.         OK = baFolderExists(repertoire)
  109.         if OK=0 then
  110.           baCreateFolder(repertoire)
  111.           repMobi = the PathName & "Install\MilanPresse\Mobiclic"
  112.           XCopyDirectory(repMobi,repertoire)
  113.         else
  114.           -- le rΘpertoire du mois est-il prΘsent ?
  115.           repertoire = baSysFolder("windows") & "MilanPresse\Mobiclic\" & rdm
  116.           OK = baFolderExists(repertoire)
  117.           if OK=0 then
  118.             -- crΘation du rΘpertoire du mois
  119.             repertoire = baSysFolder("windows") & "MilanPresse\Mobiclic"
  120.             repMilan = the PathName & "Install\MilanPresse\Mobiclic"
  121.             XCopyDirectory(repMilan,repertoire)
  122.           end if
  123.         end if
  124.       end if
  125.       
  126.     otherWise : -- la machine est un Mac -------------------------------------------------
  127.       repertoire = baSysFolder("prefs") & "MilanPresse"
  128.       OK = baFolderExists(repertoire)
  129.       if OK=0 then
  130.         -- toute l'arborescence doit Ωtre crΘΘe
  131.         baCreateFolder(repertoire)
  132.         repMilan = the PathName & "Install:MilanPresse"
  133.         XCopyDirectory(repMilan,repertoire)
  134.       else
  135.         -- le rΘpertoire Mobiclic est-il prΘsent ?
  136.         repertoire = baSysFolder("prefs") & "MilanPresse:Mobiclic"
  137.         OK = baFolderExists(repertoire)
  138.         if OK=0 then
  139.           baCreateFolder(repertoire)
  140.           repMobi = the PathName & "Install:MilanPresse:Mobiclic"
  141.           XCopyDirectory(repMobi,repertoire)
  142.         else
  143.           -- le rΘpertoire du mois est-il prΘsent ?
  144.           repertoire = baSysFolder("prefs") & "MilanPresse:Mobiclic:" & rdm
  145.           OK = baFolderExists(repertoire)
  146.           if OK=0 then
  147.             -- crΘation du rΘpertoire du mois
  148.             repertoire = baSysFolder("prefs") & "MilanPresse:Mobiclic"
  149.             repMilan = the PathName & "Install:MilanPresse:Mobiclic"
  150.             XCopyDirectory(repMilan,repertoire)
  151.           end if
  152.         end if
  153.       end if
  154.   end case
  155. end
  156.  
  157. on installationVideos
  158.   rdm = field "repDuMois"
  159.   if the machineType=256 then
  160.     -- copie des ΘlΘments α installer sur PC -------------
  161.     v = baSysFolder("windows")
  162.     volume = v.char[1]
  163.     -- copie si au moins 20 MO libres
  164.     if baDiskInfo(volume,"free") > 20480 then
  165.       repeat with i=1 to field("installPC").lines.count
  166.         SourceFile = the pathName & field("installPC").line[i].word[1] & field("installPC").line[i].word[2]
  167.         DestFile = baSysFolder("windows") & "MilanPresse\Mobiclic\"& rdm &"\Temp\" & field("installPC").line[i].word[2]
  168.         baCopyFile( SourceFile , DestFile , "IfNotExist" )
  169.         sprite(6).width = sprite(5).width*i/field("installPC").lines.count
  170.         updateStage
  171.       end repeat
  172.     end if
  173.   else
  174.     -- copie des ΘlΘments α installer sur Mac ------------
  175.     v = baSysFolder("prefs")
  176.     P = offset(":", v)
  177.     volume = v.char[1..p-1]
  178.     -- copie si au moins 20 MO libres
  179.     if baDiskInfo(volume,"free") > 20480 then
  180.       repeat with i=1 to field("installMac").lines.count
  181.         SourceFile = the pathName & field("installMac").line[i].word[1] & field("installMac").line[i].word[2]
  182.         DestFile = baSysFolder("prefs") & "MilanPresse:Mobiclic:" & rdm & ":Temp:" & field("installMac").line[i].word[2]
  183.         baCopyFile( SourceFile , DestFile , "IfNotExist" )
  184.         sprite(6).width = sprite(5).width*i/field("installMac").lines.count
  185.         updateStage
  186.       end repeat
  187.     end if
  188.   end if
  189. end