home *** CD-ROM | disk | FTP | other *** search
/ 1&1 Multimedia Trend 1996 11 B / MM_TREND.ISO / prog / t_online / shared.dir / 00300.ls next >
Encoding:
Text File  |  1996-09-18  |  5.9 KB  |  216 lines

  1. global gsCRLF, gsExchData, gbDebug, gbAnimation, gbGoto, gsGoFrame, gbSldOpen, giBlinkCast, gbDoBlink, gBlink, gbDoTheMouse, giDownFlag, gbInitFrame, gbISDN, gbIsPC, gbQuitWait, gb1u1Logo, gsIniFile, gsExtension, gsMoviePath, glParamList, glSpriteRoll, glCastOfSprite, glOrigOfSprite, glHideSprite, glAction, glStatus, glBsListe, glgotoListe, glBsFrame, glActiveRoll, giDummySliderId, giDummySliderHomeId, giLastSprite, giBsIndex, giSliderID, giMovieNr, gsLastMovie, giExtraAction, gsApp
  2.  
  3. on InitAll
  4.   InitVars()
  5.   InitSystem()
  6.   InitPath()
  7.   InitParams()
  8.   InitScreen()
  9.   InitTheMac()
  10. end
  11.  
  12. on InitVars
  13.   set gsCRLF to numToChar(13) & numToChar(10)
  14.   set gsIniFile to "1u1.ini"
  15.   set gbSldOpen to 0
  16.   set gbDoBlink to 1
  17.   set gbDoTheMouse to 0
  18.   set gBlink to 0
  19.   set giDownFlag to 0
  20.   set giLastSprite to 0
  21.   set gsExtension to ".dir"
  22.   set gbAnimation to 0
  23.   set giBsIndex to 1
  24.   set gbGoto to 0
  25.   set gbDebug to 0
  26.   set gsGoFrame to EMPTY
  27.   set giMovieNr to 0
  28.   set gbInitFrame to 0
  29.   set gbIsPC to 1
  30.   set giExtraAction to 0
  31.   set gbQuitWait to 0
  32.   set gb1u1Logo to 0
  33.   set gsApp to EMPTY
  34.   set glSpriteRoll to []
  35.   set glCastOfSprite to []
  36.   set glOrigOfSprite to []
  37.   set glAction to []
  38.   set glStatus to []
  39.   set glBsListe to []
  40.   set glgotoListe to []
  41.   set glActiveRoll to []
  42.   set gbIsPC to the machineType > 255
  43.   set gbISDN to 0
  44.   set giBlinkCast to 358
  45.   if the moviePath contains "ISDN" then
  46.     set gbISDN to 1
  47.     set giBlinkCast to 420
  48.   end if
  49. end
  50.  
  51. on InitScreen
  52.   set giDummySliderId to 47
  53.   set giDummySliderHomeId to 40
  54.   if gbISDN = 1 then
  55.     preLoadCast(316, 400)
  56.   else
  57.     preLoadCast(400, 450)
  58.   end if
  59.   repeat with i = 26 to 46
  60.     puppetSprite(i, 1)
  61.   end repeat
  62.   updateStage()
  63.   set glHideSprite to [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 45]
  64.   repeat with i = 1 to count(glHideSprite)
  65.     set the visible of sprite getAt(glHideSprite, i) to 0
  66.   end repeat
  67.   updateStage()
  68.   set glSpriteRoll to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  69.   set glCastOfSprite to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  70.   if gbISDN = 0 then
  71.     set glOrigOfSprite to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 316, 319, 322, 391, 311, 312, 313, 314, 331, 334, 340, 337, 349, 385, 358, 364, 370, 376, 396, 399, 327, 0, 0]
  72.   else
  73.     set glOrigOfSprite to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 410, 413, 416, 391, 0, 401, 402, 403, 0, 404, 340, 337, 349, 385, 0, 420, 426, 432, 447, 450, 407, 0, 0]
  74.   end if
  75.   repeat with i = 1 to 48
  76.     set x to getAt(glOrigOfSprite, i)
  77.     setAt(glCastOfSprite, i, x)
  78.   end repeat
  79.   setAt(glSpriteRoll, 26, 1)
  80.   setAt(glSpriteRoll, 27, 1)
  81.   setAt(glSpriteRoll, 28, 1)
  82.   setAt(glSpriteRoll, 34, 1)
  83.   setAt(glSpriteRoll, 35, 1)
  84.   setAt(glSpriteRoll, 36, 1)
  85.   setAt(glSpriteRoll, 37, 1)
  86.   setAt(glSpriteRoll, 38, 1)
  87.   setAt(glSpriteRoll, 39, 1)
  88.   set the constraint of sprite 39 to 29
  89.   if gbISDN = 0 then
  90.     setAt(glSpriteRoll, 40, 2)
  91.   end if
  92.   setAt(glSpriteRoll, 41, 2)
  93.   setAt(glSpriteRoll, 42, 2)
  94.   setAt(glSpriteRoll, 43, 2)
  95.   setAt(glSpriteRoll, 44, 1)
  96.   setAt(glSpriteRoll, 45, 1)
  97.   setAt(glSpriteRoll, 46, 1)
  98.   repeat with i = 1 to 4
  99.     append(glStatus, 0)
  100.   end repeat
  101.   set giSliderID to 0
  102.   repeat with i = 1 to 48
  103.     append(glAction, "DummyAction")
  104.   end repeat
  105.   setAt(glAction, 25, "Check")
  106.   setAt(glAction, 26, "GoPrev")
  107.   setAt(glAction, 27, "GoNext")
  108.   setAt(glAction, 28, "GoMenu")
  109.   setAt(glAction, 34, "Install")
  110.   setAt(glAction, 35, "Antrag")
  111.   setAt(glAction, 36, "SetAutoNein")
  112.   setAt(glAction, 37, "SetAutoJa")
  113.   setAt(glAction, 38, "SetSound")
  114.   setAt(glAction, 39, "SetSndLevel")
  115.   if gbISDN = 0 then
  116.     setAt(glAction, 40, "escInst")
  117.   end if
  118.   setAt(glAction, 41, "escAntrag")
  119.   setAt(glAction, 42, "escAuto")
  120.   setAt(glAction, 43, "escSound")
  121.   setAt(glAction, 46, "Finished")
  122.   set ok to not (the movieName contains "MENU")
  123.   if (the castNum of sprite 48 > 0) and ok then
  124.     puppetSprite(48, 1)
  125.     set the visible of sprite 48 to 0
  126.     updateStage()
  127.   end if
  128. end
  129.  
  130. on ResetScreen
  131.   if count(glOrigOfSprite) > 47 then
  132.     repeat with i = 26 to 46
  133.       set x to getAt(glOrigOfSprite, i)
  134.       set the castNum of sprite i to x
  135.     end repeat
  136.     updateStage()
  137.   end if
  138.   repeat with i = 26 to 46
  139.     if the puppet of sprite i = 1 then
  140.       puppetSprite(i, 0)
  141.     end if
  142.   end repeat
  143.   unLoad()
  144.   sound stop 1
  145.   set the volume of sound 1 to 255
  146.   sound stop 2
  147.   set the volume of sound 2 to 255
  148.   puppetSound(0)
  149.   ClearSystem()
  150.   ResetTheMac()
  151. end
  152.  
  153. on InitBsFrame
  154.   global glBsListe, glBsFrame, gbAnimation, gbInitFrame
  155.   set glBsFrame to []
  156.   repeat with i = 1 to count(glBsListe)
  157.     set x to getAt(glBsListe, i)
  158.     append(glBsFrame, label(x))
  159.   end repeat
  160.   set gbInitFrame to 1
  161. end
  162.  
  163. on SetData x
  164.   set gsData to x
  165. end
  166.  
  167. on GetData
  168.   return(gsData)
  169. end
  170.  
  171. on InitPath
  172.   global gsSoundPath
  173.   repeat with i = 1 to the number of castMembers
  174.     set ty to the castType of cast i
  175.     if ty = #sound then
  176.       set x to the fileName of cast i
  177.       set y to ExtractFile(x)
  178.       set y to gsMoviePath & "sound\" & y & ".aif"
  179.       set the fileName of cast i to y
  180.     end if
  181.     if ty = #digitalVideo then
  182.       set x to the fileName of cast i
  183.       set y to ExtractFile(x)
  184.       set y to gsMoviePath & "video\" & y
  185.       set the fileName of cast i to y
  186.     end if
  187.   end repeat
  188. end
  189.  
  190. on ExtractFile x
  191.   set p to 0
  192.   set y to EMPTY
  193.   repeat with i = 1 to length(x)
  194.     if (char i of x = "\") or (char i of x = ":") then
  195.       set p to i
  196.     end if
  197.   end repeat
  198.   set j to 0
  199.   repeat with i = p + 1 to length(x)
  200.     set j to j + 1
  201.     put char i of x into char j of y
  202.   end repeat
  203.   return y
  204. end
  205.  
  206. on CheckBsIni
  207.   global gsLastMovie
  208.   set ok to 0
  209.   if gsLastMovie = the movieName then
  210.     set ok to 1
  211.   else
  212.     set gsLastMovie to the movieName
  213.   end if
  214.   return ok
  215. end
  216.