home *** CD-ROM | disk | FTP | other *** search
/ 1&1 Multimedia Trend 1996 10 B / MM_TREND.ISO / prog / t-online / shared.dir / 00301_Script_301 < prev    next >
Text File  |  1996-08-16  |  4KB  |  234 lines

  1. --Utilites 
  2.  
  3. -- *************************************************
  4.  
  5. on Fehler Nr, Info
  6.   global CRLF, 
  7.   put Info into Text
  8.   if Nr = 101 then put "Modul: utility nicht vorhanden"
  9.   if Nr = 102 then put "Modul: fileio nicht vorhanden"
  10.   
  11.   alert "Fehler: " & Nr & CRLF & Text
  12. end Fehler
  13.  
  14.  
  15. -- *************************************************
  16.  
  17. on debug text
  18.   --put text
  19. end debug
  20.  
  21. -- *************************************************
  22. on WaitTicks Anz
  23.   set myTicks = the ticks + Anz
  24.   repeat while (the ticks < myTicks)
  25.     -- nada  
  26.   end repeat
  27. end
  28.  
  29.  
  30. -- ************************************************* 
  31.  
  32. on PlayMusic x
  33.   global giMusic
  34.   
  35.   if giMusic > 0 then 
  36.     if not soundbusy (1) then
  37.       puppetsound 0
  38.       puppetsound x 
  39.     end if
  40.   end if
  41. end
  42.  
  43.  
  44. -- ************************************************* 
  45.  
  46. on PlayNoise x
  47.   global giNoise
  48.   
  49.   
  50.   if giNoise >0 then 
  51.     puppetsound x 
  52.     --waitticks 60  
  53.   end if
  54.   
  55. end
  56.  
  57. -- ************************************************* 
  58.  
  59. on StopThatSound
  60.   global giMovieNr
  61.   
  62.   -- ausblenden Kanal , warten, dann weiter 
  63.   --debug "StopThatSound in"
  64.   
  65.   if soundBusy (1) then 
  66.     --sound FadeOut 1, 10
  67.     --WaitTicks 10
  68.     sound stop 1
  69.     --sound FadeIn 1, 10    
  70.     --WaitTicks 10
  71.   end if
  72.   
  73.   if soundBusy (2) then
  74.     --sound FadeOut 2, 10
  75.     --WaitTicks 10
  76.     sound stop 2
  77.     --sound FadeIn 2, 10  
  78.     --WaitTicks 10
  79.   end if
  80.   
  81.   
  82.   -- evtl laufendes movie anhalten
  83.   -- movie Nr. wird in waitMovie gesetzt  
  84.   if giMovieNr > 0 then 
  85.     -- set the movierate of sprite giMovieNr = 0
  86.     set giMovieNr =0
  87.   end if
  88.   
  89.   --debug "StopThatSound out"
  90.   
  91.   
  92. end
  93.  
  94.  
  95.  
  96. -- *************************************************
  97.  
  98. on BusyWait secs
  99.   global gbQuitWait
  100.   -- erlaubt interaction wΣhrend des wartens
  101.   set blink= the ticks
  102.   set anz = secs * 60
  103.   set myTicks = the ticks + Anz
  104.   repeat while (the ticks < myTicks) 
  105.     CheckMyRollover
  106.     if the ticks > blink + 10 then
  107.       myidle  
  108.       set blink= the ticks
  109.     end if
  110.     if gbQuitWait = true then
  111.       --debug "exit busy"
  112.       exit repeat
  113.     end if
  114.     
  115.   end repeat
  116.   set gbQuitWait = false
  117. end
  118.  
  119.  
  120. -- *************************************************
  121.  
  122. on SoundWait Track
  123.   -- erlaubt interaction wΣhrend des wartens
  124.   global gbQuitWait
  125.   
  126.   if Track = 0 then
  127.     set track = 2
  128.   end if
  129.   set blink= the ticks
  130.   
  131.   repeat while soundBusy (Track)
  132.     CheckMyRollover
  133.     myidle  
  134.     if gbQuitWait then 
  135.       exit repeat  
  136.     end if
  137.     
  138.   end repeat
  139. end
  140.  
  141. -- *************************************************
  142.  
  143.  
  144. on MovieWait Spn
  145.   global giMovieNr
  146.   
  147.   -- erlaubt interaction wΣhrend des wartens
  148.   
  149.   set giMovieNr = Spn
  150.   put the castnum of sprite spn into x
  151.   put the CastType of cast x into ty
  152.   set ok = true
  153.   
  154.   if x>0 then
  155.     -- gibt fehler, falls kein movie
  156.     if ty = #digitalVideo then
  157.       repeat while ok
  158.         if giMovieNr >0 then
  159.           -- falls NaviButtons gedrⁿckt, ist MovieNr =0
  160.           set ok = (the movierate of sprite Spn > 0)
  161.         else
  162.           set ok = false
  163.         end if
  164.         
  165.         CheckMyRollover
  166.         nothing  -- gib idle eine chance
  167.         nothing
  168.         myidle
  169.       end repeat
  170.     end if
  171.   end if
  172.   -- jetzt lΣuft hier  kein movie mehr
  173.   set giMovieNr = 0
  174.   
  175. end
  176.  
  177.  
  178. -- *************************************************
  179.  
  180. on IncBsi
  181.   global giBsIndex
  182.   -- set giBsIndex = giBsIndex + 1
  183. end
  184.  
  185.  
  186.  
  187. -- *************************************************
  188.  
  189. on jump x
  190.   --jump am ende er animation
  191.   -- x param fⁿr spΣtere funktionen
  192.   global gsGoFrame, gbGoto, giAuto, glGotoListe
  193.   
  194.   if giAuto = 0 then
  195.     -- zurⁿck zum menu
  196.     put GetAt (glGotoListe, 2) into  gsGoFrame 
  197.     set gbGoto = true
  198.     cursor 4 
  199.   else
  200.     -- weiter in folge
  201.     StopThatSound
  202.     put GetAt (glGotoListe, 5) into  gsGoFrame 
  203.     set gbGoto = true
  204.     cursor 4
  205.   end if
  206.   -- execute in ...
  207.   
  208.   MyIdle
  209.   
  210.   
  211. end
  212.  
  213. -- ****************************************************
  214.  
  215. on QuitMovie
  216.   global gbISDN
  217.   
  218.   --debug "quit movie"
  219.   if the moviename contains "MENU" then
  220.     go to frame "Ende"
  221.     exit
  222.   else
  223.     if gbISDN  = true then
  224.       set x = "Menu_I"  
  225.     else
  226.       set x = "Menu_O"
  227.     end if
  228.     
  229.     go to frame "Ende" of movie x
  230.     exit
  231.   end if
  232.   
  233. end
  234.