View Single Post
Old 09-25-2012, 10:51 PM   PM User | #5
failbot8000
New to the CF scene

 
Join Date: Sep 2012
Location: Buffalo
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
failbot8000 is an unknown quantity at this point
Quote:
Originally Posted by xelawho View Post
mmm...

but equally. the audio tag exists independently of the pictures or text or whatever that is used to trigger playback. Maybe I'm being thick, but I still can't see why you need multiple audio tags when you can just have all your onclicks pointing towards one element.

if you really do need to go down the multiple audio tags road, I would suggest setting a variable that "remembers" which element was the last one played, then calling pause on that one before beginning playback on the new one.
Okay. So, what your saying is, I need to have only ONE audio element, and depending on what the user clicks, change the src of the element, reload, set time to zero, then play?

So, I will put the src into the "id:" spot instead, and then simply call the audio element a second time (with a new src now). Hopefully, this second call will halt the first audio from playing?

I think I was being thick by defining multiple audio tags before....

But if I did continue down the multiple audio tag route...shouldn't what I had above do the same thing as having memory? (ie stopping everything regardless?)
failbot8000 is offline   Reply With Quote