xrobot2
xrobot2

Reputation: 21

How to stop sounds?

How to stop this sound ? :

MySound.play(0,100,null);

Upvotes: 2

Views: 931

Answers (2)

Wade Mueller
Wade Mueller

Reputation: 6059

var soundChannel:SoundChannel = MySound.play(0, 100, null);
...
soundChannel.stop();

Upvotes: 3

Brian
Brian

Reputation: 25834

play returns a SoundChannel, which has a stop() method. See Documentation.

Generates a new SoundChannel object to play back the sound. This method returns a SoundChannel object, which you access to stop the sound and to monitor volume.

Upvotes: 4

Related Questions