removeEventListener for sound is working ?
Is this working ?
Can somebody give me an example of a working code?
Thanks
2 Answers
-
this one removes itself when finished ;)
var isPlaying = false; if (!isPlaying) { isPlaying = true; var sound = Titanium.Media.createSound({url:'yoursound.mp3'}); endListener = sound.addEventListener('complete', function() { isPlaying = false; sound.removeEventListener('complete',endListener); sound.release(); }); sound.volume = 1; sound.play(); }
-
I think I understand now where I was doing wrong.
Thank you.