# If (sound issue)

**URL:** https://forum.kirupa.com/t/if-sound-issue/208096
**Category:** Uncategorized
**Created:** [November 24, 2006, 9:32pm UTC](https://forum.kirupa.com/t/if-sound-issue/208096 "2006-11-24T21:32:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yem224](https://avatars.discourse-cdn.com/v4/letter/y/b38774/32.png) [@yem224](https://forum.kirupa.com/u/yem224)
#### Post date: [November 24, 2006, 9:32pm UTC](https://forum.kirupa.com/t/if-sound-issue/208096/1 "2006-11-24T21:32:27Z")

</div>

I am trying to teach myself actionscript, but with my basic knowledge this one has me stumped.

1. I have a main.swf that loads external swfs.

I am trying to stop the background music when one loads a specfic swf, and start the music when one leaves that swf. Here’s the code I came up with, but it doesn’t work.

if(\_root.section = “dj.swf”) {  
\_root.music.bgSound4.stop();  
} else if (\_root.section != “dj.swf”) {  
\_root.music.bgSound4.loadSound(“Communication.mp3”, true);  
bgSound4.start(0,99);  
}

I want to be able to listen to samples of the djs without overlapping the background music.  
Please help.
