Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

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

$
0
0

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


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>