Skip to main content
Participating Frequently
January 3, 2016
Question

Actionscript 3.0 How can I add a new background sound file after previously stopped

  • January 3, 2016
  • 1 reply
  • 206 views

So i have a animation that has an intro screen and a next button. The next button stops all the intro background music and proceeds to the next frame?.

Right now I have gotten the background music for the intro to play and stop when the next button is clicked. How can I get a new background music to play in the next frame?

The code I have right now for the intro is

openingBackground = new Openingtest2();

  bgmSoundChannel = openingBackground.play

and then in the nextbutton function it is

SoundMixer.stopAll();

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
January 3, 2016

use similar code,

bgSound = new BgSound();  // use the correct class

bgSound.play();  // there's no need for a soundchannel unless you use it somewhere.