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

how to play/pause audio/symbol from within parent symbol

$
0
0

i'm making an audio player that has a playbar to show how much of the song has played.

 

the animation is set up like this

 

stage/container/bar

 

container and bar are both symbols. container holds an audio file, and a button to play the audio and bar symbol. i need to be able to toggle the audio file within 'container', and the playbar within 'bar' at the same time with this button. is this possible?

at the moment i have the code:

 

 

 

sym.play ("audioPlay")

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

 

 

if (sym.$("_01_Wildfire_13")[0].paused) {

  sym.$("_01_Wildfire_13")[0].play();

} else {

  sym.$("_01_Wildfire_13")[0].pause();

}

 

if (sym.getSymbol("progressBar").isPlaying()) {

    sym.stop();

} else {

    sym.play();

}

 

 

 

 

it toggles the audio and plays the bar symbol, but it doesn't toggle the symbol on/off.


Viewing all articles
Browse latest Browse all 9897

Trending Articles



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