View comments | RSS feed

Stopping streaming sounds

There is a quirk in the playback process for sounds that are streaming--that is, for sounds that are still loading while they are being played. When your application calls the SoundChannel.stop() method on a SoundChannel instance that is playing back a streaming sound, the sound playback stops for one frame, and then on the next frame, it restarts from the beginning of the sound. This occurs because the sound loading process is still underway. To stop both the loading and the playback of a streaming sound, call the Sound.close() method.


Flash CS3


Comments


No screen name said on Aug 13, 2007 at 10:56 AM :
If we close the sound and thus stop playing and loading the streaming sound, are we able to resume loading from the same point? Or do we need to start reloading the entire sound file again?

Thanks!
bobsquirrell said on Sep 18, 2007 at 5:45 AM :
The Sound.close() method will not work if called from within a function, for example in the code associated with a component button. An error is produced because it attempts to close a different instance of the sound. Is there a way round this?

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00000292.html