home *** CD-ROM | disk | FTP | other *** search
/ 1&1 Multimedia Trend 1996 10 B / MM_TREND.ISO / prog / isdn / shared.dir / 00300.ls next >
Encoding:
Text File  |  1996-08-18  |  6.4 KB  |  244 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 InitAll2
  13.   InitVars()
  14.   InitSystem()
  15.   InitPath()
  16.   InitParams()
  17.   InitTheMac()
  18. end
  19.  
  20. on InitVars
  21.   set gsCRLF to numToChar(13) & numToChar(10)
  22.   set gsIniFile to "1u1.ini"
  23.   set gbSldOpen to 0
  24.   set gbDoBlink to 1
  25.   set gbDoTheMouse to 0
  26.   set gBlink to 0
  27.   set giDownFlag to 0
  28.   set giLastSprite to 0
  29.   set gsExtension to ".dir"
  30.   set gbAnimation to 0
  31.   set giBsIndex to 1
  32.   set gbGoto to 0
  33.   set gbDebug to 0
  34.   set gsGoFrame to EMPTY
  35.   set giMovieNr to 0
  36.   set gbInitFrame to 0
  37.   set gbIsPC to 1
  38.   set giExtraAction to 0
  39.   set gbQuitWait to 0
  40.   set gb1u1Logo to 0
  41.   set gsApp to EMPTY
  42.   set glSpriteRoll to []
  43.   set glCastOfSprite to []
  44.   set glOrigOfSprite to []
  45.   set glAction to []
  46.   set glStatus to []
  47.   set glBsListe to []
  48.   set glgotoListe to []
  49.   set glActiveRoll to []
  50.   set gbIsPC to the machineType > 255
  51.   set gbISDN to 0
  52.   set giBlinkCast to 358
  53.   if the moviePath contains "ISDN" then
  54.     set gbISDN to 1
  55.     set giBlinkCast to 420
  56.   end if
  57. end
  58.  
  59. on InitScreen
  60.   set giDummySliderId to 47
  61.   set giDummySliderHomeId to 40
  62.   if gbISDN = 1 then
  63.     preLoadCast(316, 400)
  64.   else
  65.     preLoadCast(400, 450)
  66.   end if
  67.   repeat with i = 26 to 46
  68.     puppetSprite(i, 1)
  69.   end repeat
  70.   updateStage()
  71.   set glHideSprite to [29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 45]
  72.   repeat with i = 1 to count(glHideSprite)
  73.     set the visible of sprite getAt(glHideSprite, i) to 0
  74.   end repeat
  75.   updateStage()
  76.   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]
  77.   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]
  78.   if gbISDN = 0 then
  79.     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]
  80.   else
  81.     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]
  82.   end if
  83.   repeat with i = 1 to 48
  84.     set x to getAt(glOrigOfSprite, i)
  85.     setAt(glCastOfSprite, i, x)
  86.   end repeat
  87.   setAt(glSpriteRoll, 26, 1)
  88.   setAt(glSpriteRoll, 27, 1)
  89.   setAt(glSpriteRoll, 28, 1)
  90.   setAt(glSpriteRoll, 34, 1)
  91.   setAt(glSpriteRoll, 35, 1)
  92.   setAt(glSpriteRoll, 36, 1)
  93.   setAt(glSpriteRoll, 37, 1)
  94.   setAt(glSpriteRoll, 38, 1)
  95.   setAt(glSpriteRoll, 39, 1)
  96.   set the constraint of sprite 39 to 29
  97.   if gbISDN = 0 then
  98.     setAt(glSpriteRoll, 40, 2)
  99.   end if
  100.   setAt(glSpriteRoll, 41, 2)
  101.   setAt(glSpriteRoll, 42, 2)
  102.   setAt(glSpriteRoll, 43, 2)
  103.   setAt(glSpriteRoll, 44, 1)
  104.   setAt(glSpriteRoll, 45, 1)
  105.   setAt(glSpriteRoll, 46, 1)
  106.   repeat with i = 1 to 4
  107.     append(glStatus, 0)
  108.   end repeat
  109.   set giSliderID to 0
  110.   repeat with i = 1 to 48
  111.     append(glAction, "DummyAction")
  112.   end repeat
  113.   setAt(glAction, 25, "Check")
  114.   setAt(glAction, 26, "GoPrev")
  115.   setAt(glAction, 27, "GoNext")
  116.   setAt(glAction, 28, "GoMenu")
  117.   setAt(glAction, 34, "Install")
  118.   setAt(glAction, 35, "Antrag")
  119.   setAt(glAction, 36, "SetAutoNein")
  120.   setAt(glAction, 37, "SetAutoJa")
  121.   setAt(glAction, 38, "SetSound")
  122.   setAt(glAction, 39, "SetSndLevel")
  123.   if gbISDN = 0 then
  124.     setAt(glAction, 40, "escInst")
  125.   end if
  126.   setAt(glAction, 41, "escAntrag")
  127.   setAt(glAction, 42, "escAuto")
  128.   setAt(glAction, 43, "escSound")
  129.   setAt(glAction, 46, "Finished")
  130.   set ok to not (the movieName contains "MENU")
  131.   if (the castNum of sprite 48 > 0) and ok then
  132.     puppetSprite(48, 1)
  133.     set the visible of sprite 48 to 0
  134.     updateStage()
  135.   end if
  136. end
  137.  
  138. on ResetScreen
  139.   if count(glOrigOfSprite) > 47 then
  140.     repeat with i = 26 to 46
  141.       set x to getAt(glOrigOfSprite, i)
  142.       set the castNum of sprite i to x
  143.     end repeat
  144.     updateStage()
  145.   end if
  146.   repeat with i = 26 to 46
  147.     if the puppet of sprite i = 1 then
  148.       puppetSprite(i, 0)
  149.     end if
  150.   end repeat
  151.   unLoad()
  152.   sound stop 1
  153.   set the volume of sound 1 to 255
  154.   sound stop 2
  155.   set the volume of sound 2 to 255
  156.   puppetSound(0)
  157.   ClearSystem()
  158.   ResetTheMac()
  159. end
  160.  
  161. on ResetScreen2
  162.   if count(glOrigOfSprite) > 47 then
  163.     repeat with i = 26 to 46
  164.       set x to getAt(glOrigOfSprite, i)
  165.       set the castNum of sprite i to x
  166.     end repeat
  167.     updateStage()
  168.   end if
  169.   repeat with i = 26 to 46
  170.     if the puppet of sprite i = 1 then
  171.       puppetSprite(i, 0)
  172.     end if
  173.   end repeat
  174.   unLoad()
  175.   set the volume of sound 1 to 255
  176.   set the volume of sound 2 to 255
  177.   ClearSystem()
  178.   ResetTheMac()
  179. end
  180.  
  181. on InitBsFrame
  182.   global glBsListe, glBsFrame, gbAnimation, gbInitFrame
  183.   set glBsFrame to []
  184.   repeat with i = 1 to count(glBsListe)
  185.     set x to getAt(glBsListe, i)
  186.     append(glBsFrame, label(x))
  187.   end repeat
  188.   set gbInitFrame to 1
  189. end
  190.  
  191. on SetData x
  192.   set gsData to x
  193. end
  194.  
  195. on GetData
  196.   return(gsData)
  197. end
  198.  
  199. on InitPath
  200.   global gsSoundPath
  201.   repeat with i = 1 to the number of castMembers
  202.     set ty to the castType of cast i
  203.     if ty = #sound then
  204.       set x to the fileName of cast i
  205.       set y to ExtractFile(x)
  206.       set y to gsMoviePath & "sound\" & y & ".aif"
  207.       set the fileName of cast i to y
  208.     end if
  209.     if ty = #digitalVideo then
  210.       set x to the fileName of cast i
  211.       set y to ExtractFile(x)
  212.       set y to gsMoviePath & "video\" & y
  213.       set the fileName of cast i to y
  214.     end if
  215.   end repeat
  216. end
  217.  
  218. on ExtractFile x
  219.   set p to 0
  220.   set y to EMPTY
  221.   repeat with i = 1 to length(x)
  222.     if (char i of x = "\") or (char i of x = ":") then
  223.       set p to i
  224.     end if
  225.   end repeat
  226.   set j to 0
  227.   repeat with i = p + 1 to length(x)
  228.     set j to j + 1
  229.     put char i of x into char j of y
  230.   end repeat
  231.   return y
  232. end
  233.  
  234. on CheckBsIni
  235.   global gsLastMovie
  236.   set ok to 0
  237.   if gsLastMovie = the movieName then
  238.     set ok to 1
  239.   else
  240.     set gsLastMovie to the movieName
  241.   end if
  242.   return ok
  243. end
  244.