|
|
|
#1 |
|
M.D.
Join Date: Dec 2002
Location: Shelter
Posts: 4,060
|
[AS3] fix for SoundComplete?
anyone know of a fix for the dreaded Event.SOUND_COMPLETE in AS3?
looping a sound seamlessly will not work with this event. the only other way I could see is using a timer or enterFrame, and figuring out the change in position over the sounds duration, and using that to play the sound again, something like: var magicNumber = ? var seamlessEnd = sound.duration - magicNumber; timer.delay = seamlessEnd; |
|
|
|
|
|
#2 |
|
FK founder & general loiterer
Join Date: Feb 2000
Location: Sydney
Posts: 1,148
|
If you are just looping the one loop then why not use the yourMusicTrack.play(0,999, null) to play it 999 times.
SOUND_COMPLETE sucks
__________________
Regards Mark Fennell - Flash Kit Founder, general loiterer ------------------------------- markfennell.com | original games | world panoramas |
|
|
|
|
|
#3 |
|
M.D.
Join Date: Dec 2002
Location: Shelter
Posts: 4,060
|
yeah, guess thats the only thing to do.
|
|
|
|
|
|
#4 |
|
Moderator
Join Date: Jul 2001
Location: Estonia
Posts: 8,193
|
I have used it for years without problems. Of course I always pick music that has pause in the end.
|
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Aug 2002
Location: london village
Posts: 623
|
this has always made me sad, being both a coder and a composer of loop based music, I have always dreamed of creating aiMuse style interactive score kind of thingy for flash, allowing parts to come in and out as actions change on screen...but alas with out a seamless onComplete it's impossible.
Chris Error
__________________
kill5 |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Feb 2003
Location: UK
Posts: 508
|
Although I've not pushed this into AS3 yet, in earlier versions I actually did my own checks on how far thru the sound clip I was. By doing this I was able to dynamically load the next part seamlessly, or replay the current clip.
Can't imagine I'll go back to using the sound complete check now.
__________________
pling |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Sep 2004
Posts: 628
|
Sounds like you are just looking for a way to loop one file. Why would you need on sound complete anyway?
Or maybe I'm off?
__________________
game examples |
|
|
|
|
|
#8 | |
|
Senior Member
Join Date: Jan 2008
Location: UK
Posts: 262
|
Quote:
Would be very useful to know of a solution to this though. |
|
|
|
|
|
|
#9 | |
|
M.D.
Join Date: Dec 2002
Location: Shelter
Posts: 4,060
|
Quote:
It still is a problem though for multiple tracks/sounds as chris pointed out. |
|
|
|
|
![]() |
|
||||||
| Thread Tools | |
| Display Modes | |
|
|