This is what I did :-
1. I have a symbol "parent" which contains another symbol "child" which inturn contains an audio element named "Talk" .
2. In the click event of the "parent" symbol I have the following code:-
var mySymbolObject = sym.getSymbol("parent").getSymbol("child");
Now when we publish the file , the audio will play but when we click on the parent symbol the audio will pause .
Hope it helps .
Thanks a lot for your help! I really appreciate.
I'll just take a chance for another question:
What if I want this sound to fade out, instead of pausing. Is that much more complicated?
I guess I would have to play with this?:
sym.$("my_audio_element").volume = 0.2;
As you guessed, if you want to fade, you're going to have to play around with the volume setting. The only thing I can think of is a setInterval call to decrease the volume over a set time.
Hope that points you in the right direction!