You need to reset your sound to replay
I would use:
sym.$("sound").currentTime = 0;
Great, thank you, also wondering about the .wav file so I won't need that correct?
Well, I personally add the wav files in case but I believe IE does play mp3 as well. I guess you can test for different circumstances like older browsers though animate does not work at all on older IE v8
Thanks for your answer but I need a bit more info.
I have six rollover buttons each should be assigned a different audio sound.
Each rollover is a symbol on the main timeline, so when I import the audio for lets say rollover_1 do I open the rollover one symbol and drag the audio on THAT timeline?
Or do I have to do this on the main timeline?
In the symbol timeline there is two lables (up and over)
the audio would need to play on the over state which is why I figure if I need to put the audio on the symbol timeline it would make sense.
Lets say this is true so on the symbol timeline the over state is exactly at 0.01
so would I use the following?
// Play an audio track
THEN add the code you gave me?
sym.$("rollover_1").currentTime = 0; ????????
If I'm inside the symbol timeline where is the current time and play times?
OR do I place the codes on the maintimeline?
I hope I'm clear, please advize
Hello - you can do what you prefer. I personally write all my code in compositionReady so I do not have to chase stuff around but it is a matter of choice.
If you want to write your code in compositionReady then you can add all the sounds on the main stage.
Then you can add your code for each button.
You can also write your code in the buttons' code window. Use the code snippet so you get the right scopr.
You can also insert the sound in your buttons but frankly I never do.
Here is a sample. in 2014.0.1 but the same code will work in 2014.1
code used below:
sym.$("TaDa").currentTime = 0;