15 Replies Latest reply on Sep 12, 2013 1:14 PM by resdesign

    Stop Buzz.js

    gcgCui

      Sorry I didn´t find an answer in the others post and this problem it´s blowing up my mind. I use Buzz.js for my audio in Edge and everything plays perfect. But when I call the << .stop >> nothing changes. I´m using a counter, << if counter == 1 play this sound >> <<if counter == 2 play this other sound and stop the previous>> and that is the problem, it plays the second sound but not stop the other. I show you my code.

       

       

      Thanks

       

       

       

      var valorContador = sym.getVariable("contador");

       

       

       

       

       

       

       

       

      var indios = new buzz.sound( "audios/indios", {

          formats: [ "ogg", "mp3", "aac" ]

      });

       

       

      var anunciob = new buzz.sound( "audios/anuncioBoogies", {

          formats: [ "ogg", "mp3", "aac" ]

      });

       

       

       

       

      if(valorContador == 0){

       

       

      sym.getSymbol("_luces").play();

       

       

       

       

      //INDIOS

       

       

      indios.play();

          .loop()

      } ;

       

       

       

       

      if(valorContador == 1){

       

       

       

       

      // LAVAMAX

      indios.stop();

      };

       

       

      if(valorContador == 2){

       

       

       

       

      //BOOGIES

       

       

      anunciob.play();

       

       

       

      };

       

       

      if(valorContador == 3){

       

       

       

       

      sym.getComposition().getStage().getSymbol("_escena1"). $("btnReset").show();

       

       

       

       

      };