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