[size=2]I’m trying to find a way to play a sound sequentially. In other words, I want to play a sound file from a certain point to a certain amount of time (NOT to the end). So to play a portion of that file.
Now, I know I have to use mySound.start(secondOffset), but how can I stop it?
Sound.onSoundComplete is not useful, as I want to stop the sound at a certain time from playing, which might not be the end.
I guess that the approach is to use the Sound.position property, and to stop the sound when the position meets criteria.
I’ve tried so far all kinds of approaches, like making a loop while the sound plays and checking the Time, but nothing seems to work.
If someone has an idea, kindly post it please.
Basically I need something like mySound.start (secondOffset, amount), where amount=for how long should the sound play.
Thank you in advance.