0 Replies Latest reply on Jan 8, 2014 9:28 AM by Machu Picchu Ltd

    Play/pause Audio - Edge Commons, variables???

    Machu Picchu Ltd

      Hi

       

      So i have a comp playing sound using edge commons, when button clicks i call

       

      EC.Sound.play("autum");

       

      but i want to click the button again and for it to pause, so i think i need to set up a variable?

       

      heres my code,

       

      var onOff = 0;

       

       

      if (sym.getCompostion().getStage().getSymbol('autum').onOff == 0){

                sym.getCompostion().getStage().getSymbol('autum').onOff = 1;

                sym.getCompostion().getStage().getSymbol('autum').EC.Sound.play;

      }

      else {

                sym.getCompostion().getStage().getSymbol('autum').onOff = 0;

                sym.getCompostion().getStage().getSymbol('autum').EC.Sound.play;

      }

       

       

      any ideas where i'm going wrong? has anyone done this with Edge Commons or Buzz.js or Edge Hero?

       

      Ta