Search code examples
actionscript-3actionflash-cs3

Recyclable Sound Object in Actionscript 3?


Using ONE Sound() object in Actionscript3, how can I play a one MP3 and then, when the user chooses a different one, play a second sound, using the SAME Sound() object?

EDIT: See my answer for how I did it.


Solution

  • You cannot use same Sound object to play multiple files.

    Once load() is called on a Sound object, you can't later load a different sound file into that Sound object. To load a different sound file, create a new Sound object.