Sound.onSoundComplete: ¿Bug or feature?
Maybe this is common place, but it's something that has surprised me.
The problem I've found is related to the last posts I've made about the state machines.
I've been testing a game that I developed some time ago. At a given moment, a transition must be executed when a sound is finished ( that means that something must happen when a sound is finished ). But, although the game always worked, today it didn't!!.
After a two hours debugging session, I've just tried to play the game in a different computer, and it worked!!. And then I remembered. I reinstalled the operating system of my development machine two days ago, after my holydays ( sniff :-( ), and the new system didn't recognize the sound card. In fact, if I look at my control panel, I see that there are not audio devices installed.
So what has happened?. It seems that the onSoundComplete event is never triggered. I don't know if it's the expected behaviour or not, but well, it's something I must remember!
Comentarios
By definition, onSoundComplete triggers when the sound that was playing is completed. So, what to expect if no sound was ever played?
I had a similar experience while ago, when the workstation I was using at the time had trouble with the audio system built-in in the motherboard: it would start fine, but after a few hours, the audio would just shut off. As a consequence, even the live preview within the Flash IDE would not work, if playback depended on a streaming sound, for example.
After that, it all made sense. Sound playback performance within the Flash Player depends on your hardware configuration. So, yes, you have to keep that in mind when designing your applications.
Publicado por: Oscar Trelles | August 12, 2004 05:41 PM