home *** CD-ROM | disk | FTP | other *** search
/ 1&1 Multimedia Trend 1996 10 B / MM_TREND.ISO / prog / t-online / shared.dir / 00306.ls < prev    next >
Encoding:
Text File  |  1996-08-16  |  7.0 KB  |  328 lines

  1. on idle
  2.   Myidle()
  3. end
  4.  
  5. on Myidle
  6.   global gbDoBlink, gBlink, gAuto, gbISDN, giBlinkCast, gbGoto, gsGoFrame, gsExtension, gbSldOpen, gbQuitWait
  7.   if gbDoBlink = 1 then
  8.     if the ticks > gBlink then
  9.       set x to 40 + gbISDN
  10.       if the castNum of sprite x = giBlinkCast then
  11.         set the castNum of sprite x to giBlinkCast + 2
  12.         set gBlink to the ticks + 20
  13.       else
  14.         set the castNum of sprite x to giBlinkCast
  15.         set gBlink to the ticks + 20
  16.       end if
  17.     end if
  18.     updateStage()
  19.   end if
  20.   if gbGoto = 1 then
  21.     debug("Goto in idle  <<<<<<<<:" & gsGoFrame & ":")
  22.     set gbGoto to 0
  23.     cursor(-1)
  24.     set gbQuitWait to 1
  25.     if gsGoFrame contains "," then
  26.       set m to item 1 of gsGoFrame
  27.       set f to item 2 of gsGoFrame
  28.       go(f, m)
  29.       exit
  30.     else
  31.       go(gsGoFrame)
  32.       exit
  33.     end if
  34.   end if
  35.   if gbSldOpen = 1 then
  36.     CheckMyRollover()
  37.   end if
  38. end
  39.  
  40. on Install
  41.   global gsGoMain, gsGoSub
  42.   debug("install t-online .. ")
  43.   set gsGoMain to "Install"
  44.   set gsGoSub to EMPTY
  45.   WriteParams()
  46.   SendParams()
  47.   QuitMovie()
  48. end
  49.  
  50. on Antrag
  51.   global gsGoMain, gsGoSub
  52.   debug("Antragsformular ")
  53.   set gsGoMain to "Antrag"
  54.   set gsGoSub to EMPTY
  55.   WriteParams()
  56.   SendParams()
  57.   QuitMovie()
  58. end
  59.  
  60. on SetAutoNein
  61.   global giAuto, giLastSprite
  62.   debug("AutoInter:" & giAuto)
  63.   set x to 0
  64.   set x to getAt(glOrigOfSprite, giLastSprite)
  65.   setAt(glCastOfSprite, giLastSprite, x + 6)
  66.   set the castNum of sprite giLastSprite to x + 6
  67.   set x to getAt(glOrigOfSprite, giLastSprite + 1)
  68.   setAt(glCastOfSprite, giLastSprite + 1, x)
  69.   set the castNum of sprite (giLastSprite + 1) to x
  70.   updateStage()
  71.   set giAuto to 0
  72.   WriteParams()
  73. end
  74.  
  75. on SetAutoJa
  76.   global giAuto, giLastSprite
  77.   debug("AutoGesteuert:" & giAuto)
  78.   set x to 0
  79.   set x to getAt(glOrigOfSprite, giLastSprite)
  80.   setAt(glCastOfSprite, giLastSprite, x + 6)
  81.   set the castNum of sprite giLastSprite to x + 6
  82.   set x to getAt(glOrigOfSprite, giLastSprite - 1)
  83.   setAt(glCastOfSprite, giLastSprite - 1, x)
  84.   set the castNum of sprite (giLastSprite - 1) to x
  85.   updateStage()
  86.   set giAuto to 1
  87.   WriteParams()
  88. end
  89.  
  90. on SetSound
  91. end
  92.  
  93. on SetSndLevel
  94.   global giTmpLevel
  95.   debug("Set soundlevel: " & giTmpLevel)
  96.   set x to integer(float(giTmpLevel) / 1.39999999999999991)
  97.   set the soundLevel to x
  98.   puppetSound("chord")
  99. end
  100.  
  101. on ChangeSoundLevel
  102.   global giTmpLevel
  103.   repeat while the mouseDown
  104.     set the locH of sprite 39 to the mouseH
  105.     updateStage()
  106.   end repeat
  107.   set divi to 10
  108.   set y to float(1)
  109.   set min to the left of sprite 29
  110.   set max to float(the width of sprite 29)
  111.   set pos to the left of sprite 39 + 10
  112.   set x to pos - min
  113.   if x < 0 then
  114.     set x to 0
  115.   end if
  116.   set y to float(x) / max * divi
  117.   set y to integer(y) + 1
  118.   if y > 10 then
  119.     set y to 10
  120.   end if
  121.   set giTmpLevel to integer(y)
  122.   debug("change sound....")
  123. end
  124.  
  125. on ChangeSoundOnOff
  126.   global glOrigOfSprite, giTmpNoise, giTmpMusic
  127.   debug("change On/off")
  128.   set spn to 38
  129.   set Links to the left of sprite spn
  130.   set pos to the mouseH - Links
  131.   if (pos > 1) and (pos < 26) then
  132.     set giTmpNoise to 1
  133.   else
  134.     if (pos > 29) and (pos < 56) then
  135.       set giTmpNoise to 0
  136.     else
  137.       if (pos > 70) and (pos < 97) then
  138.         set giTmpMusic to 1
  139.       else
  140.         if (pos > 103) and (pos < 126) then
  141.           set giTmpMusic to 0
  142.         end if
  143.       end if
  144.     end if
  145.   end if
  146.   ChangeSpriteSoundOnOff()
  147. end
  148.  
  149. on ChangeSpriteSoundOnOff
  150.   global glOrigOfSprite, giTmpNoise, giTmpMusic
  151.   debug("change On/Off sprite")
  152.   set x to 0
  153.   set spn to 38
  154.   set x to getAt(glOrigOfSprite, spn)
  155.   if giTmpNoise = 1 then
  156.     if giTmpMusic = 1 then
  157.       set the castNum of sprite spn to x
  158.     else
  159.       set the castNum of sprite spn to x + 2
  160.     end if
  161.   else
  162.     if giTmpMusic = 1 then
  163.       set the castNum of sprite spn to x + 1
  164.     else
  165.       set the castNum of sprite spn to x + 3
  166.     end if
  167.   end if
  168.   updateStage()
  169. end
  170.  
  171. on GoNext
  172.   global giError, gsX, gbGoto, gsGoFrame, gsMenuName
  173.   ChkFramePos(1)
  174.   StopThatSound()
  175.   debug("GoNext: " & gsX)
  176.   set gbGoto to 1
  177.   set gsGoFrame to gsX
  178.   cursor(4)
  179. end
  180.  
  181. on GoPrev
  182.   global giError, gsX, gbGoto, gsGoFrame, gsMenuName
  183.   ChkFramePos(0)
  184.   StopThatSound()
  185.   debug("GoPrev: " & gsX)
  186.   set gbGoto to 1
  187.   set gsGoFrame to gsX
  188. end
  189.  
  190. on GoMenu
  191.   global gsMenuName, gbGoto, gsGoFrame, giAuto
  192.   debug("go menu:" & gsMenuName)
  193.   StopThatSound()
  194.   set gbGoto to 1
  195.   set gsGoFrame to getAt(glgotoListe, 3)
  196.   if giAuto > 0 then
  197.     set giAuto to 0
  198.     WriteParams()
  199.   end if
  200. end
  201.  
  202. on Finished
  203.   global gsGoMain, gsGoSub, gbDebug, gbISDN
  204.   debug("ende des movies")
  205.   StopThatSound()
  206.   set gsGoMain to "Ende"
  207.   set gsGoSub to EMPTY
  208.   WriteParams()
  209.   SendParams()
  210.   QuitMovie()
  211. end
  212.  
  213. on EinsInfo
  214.   global giLastSprite
  215.   if giLastSprite <> 44 then
  216.     set the visible of sprite 45 to 0
  217.   end if
  218. end
  219.  
  220. on escInst
  221.   global giLastSprite, giSliderID, glStatus, gsGoMain, gsGoSub, gbDebug
  222.   debug("proc BtnIst..")
  223.   if giSliderID = 0 then
  224.     SliderVisible(1, 1)
  225.   else
  226.     if giSliderID = 1 then
  227.       SliderVisible(1, 0)
  228.     end if
  229.   end if
  230. end
  231.  
  232. on escAntrag
  233.   global giLastSprite, giSliderID, glStatus, glCastOfSprite
  234.   debug("proc BtnAntrag..")
  235.   if giSliderID = 0 then
  236.     SliderVisible(2, 1)
  237.   else
  238.     if giSliderID = 2 then
  239.       SliderVisible(2, 0)
  240.     end if
  241.   end if
  242. end
  243.  
  244. on escAuto
  245.   global giLastSprite, giSliderID, glStatus, glCastOfSprite
  246.   debug("proc BtnAuto..")
  247.   if giSliderID = 0 then
  248.     SliderVisible(3, 1)
  249.   else
  250.     if giSliderID = 3 then
  251.       SliderVisible(3, 0)
  252.     end if
  253.   end if
  254.   debug("  ready BtnAuto")
  255. end
  256.  
  257. on escSound
  258.   global giLastSprite, giSliderID, glStatus, glCastOfSprite, giTmpNoise, giTmpMusic, giTmpLevel, giNoise, giMusic, giSoundLevel
  259.   debug("proc sound.")
  260.   if giSliderID = 0 then
  261.     SliderVisible(4, 1)
  262.   else
  263.     if giSliderID = 4 then
  264.       if the mouseV < 335 then
  265.         set giMusic to giTmpMusic
  266.         set giNoise to giTmpNoise
  267.         set giSoundLevel to giTmpLevel
  268.         WriteParams()
  269.       end if
  270.       SliderVisible(4, 0)
  271.     end if
  272.   end if
  273. end
  274.  
  275. on DummyAction
  276.   debug("Dummy !! .. ")
  277. end
  278.  
  279. on GoKatalog x
  280.   global gsGoMain, gsGoSub
  281.   debug("katalog ... ")
  282.   set gsGoMain to x
  283.   set gsGoSub to EMPTY
  284.   WriteParams()
  285.   SendParams()
  286.   QuitMovie()
  287. end
  288.  
  289. on ChkFramePos Richtung
  290.   global glBsListe, glBsFrame, giError, gsX, giAuto
  291.   set fnr to 0
  292.   set idx to 0
  293.   set gsX to EMPTY
  294.   set wo to the frame
  295.   set fnr to marker(Richtung)
  296.   set idx to getOne(glBsFrame, fnr)
  297.   debug("ChkFrame: " & wo & " zu: " & fnr & ", " & idx)
  298.   if idx = 0 then
  299.     debug(">>>>>marker not found")
  300.   end if
  301.   if Richtung = 0 then
  302.     if idx > 1 then
  303.       set gsX to getAt(glBsListe, idx - 1)
  304.     else
  305.       if giAuto = 0 then
  306.         set gsX to getAt(glgotoListe, 1)
  307.       else
  308.         set gsX to getAt(glgotoListe, 4)
  309.       end if
  310.     end if
  311.   else
  312.     if fnr > wo then
  313.       if idx > 0 then
  314.         set gsX to getAt(glBsListe, idx)
  315.       else
  316.         set gsX to getAt(glgotoListe, 2)
  317.       end if
  318.     else
  319.       if giAuto = 0 then
  320.         set gsX to getAt(glgotoListe, 2)
  321.       else
  322.         set gsX to getAt(glgotoListe, 5)
  323.       end if
  324.     end if
  325.     debug("Frame=: " & gsX)
  326.   end if
  327. end
  328.