hi,
imho a better solution is to use the sound.onSoundComplete event:
mySound.onSoundComplete = function() { loopCount++ }
it is fired next frame after the sound ends. if you start your sound using a
script like mySound.start(0,9999) it may be your sound restarts (and resets
sound.position) before the next frame events calls your check.
greetings
tobias
ps: sorry about my bad english :)
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf
> Of Alain Rousseau
> Sent: Thursday, November 17, 2005 7:17 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] onLoop event for sound
>
>
> Hi Mark,
>
> you could monitor the position of the sound comparred to it's
> duration,
> that way you know when it arrives at the end of the sound.
>
> if (sound.position == sound.duration) {
> loopCount++;
> }
>
> In this case, the loop count will be made at the end of the sound.
>
> HTH
>
> Alain
>
> Mark Walters wrote:
>
> >Does anyone know of a good way to create an onLoop event that gets
> >fired everytime a sound loops. I need to keep track of how
> many loops
> >are left. _______________________________________________
> >Flashcoders mailing list
> >[email protected]
> >http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> >
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders