So, I have web page that uses javascript to let a user select different audio files to listen to (using this player: http://www.macloo.com/examples/audio_player/) which works great in every browser except for any version of IE. After the audio starts playing I can’t figure out a programmatic way to make the audio stop playing after the user clicks on another item to listen to. I don’t have access to the source of the swf so I’m trying to use javascript to do this. I went so far as to replace the entire body of the page – $(“body”).html(“blank”) – but it still played the audio loaded into the swf in it’s entirety.
Is there any way I can completely remove a swf from a page (sound and all) just using javascript?
Well, I tried all of the solutions proposed and they didn’t work across all browsers for me. 🙁 What I ended up doing is loading up the flash content in an iframe – when I changed the src of that it would completely and reliably kill the audio that was playing. I think this might have been because the audio appeared to be streaming? Ugh, anyway – iframe time!