# Music problem

**URL:** <https://forum.kirupa.com/t/music-problem/23742>\
**Category:** Uncategorized\
**Created:** [June 21, 2003, 8:17pm UTC](https://forum.kirupa.com/t/music-problem/23742 "2003-06-21T20:17:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![hojo](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hojo](https://forum.kirupa.com/u/hojo)\
**Post date:** [June 21, 2003, 8:17pm UTC](https://forum.kirupa.com/t/music-problem/23742/1 "2003-06-21T20:17:50Z")

</div>

alright, we’ve got a movie for a webpage and a character on the beginning who’s a button for the music to be on and off, like when you click him he turns it off and then again he starts playing it and turns the music on again.

that’s in the first scene. when you’re on say scene 4 and hit the back button to go to scene 3, it repeats the music so it’s playing two times at the same time, which we don’t want. we want it to play smoothly so we can go without a difference in the music and it only to be on/off from the first scene.

hope that’s not confusing, any help would be appreciated.  
thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 21, 2003, 11:53pm UTC](https://forum.kirupa.com/t/music-problem/23742/2 "2003-06-21T23:53:25Z")

</div>

anyone?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 22, 2003, 12:02am UTC](https://forum.kirupa.com/t/music-problem/23742/3 "2003-06-22T00:02:41Z")

</div>

Let me see if iget the idea…  
Scene 1: U can control sound on/off  
Scene 4: u cannot control sound on/off  
When u go from scene 4 to 1, music keeps playing instead of restarting.

is dat correct?  
:-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 22, 2003, 12:20am UTC](https://forum.kirupa.com/t/music-problem/23742/4 "2003-06-22T00:20:52Z")

</div>

we got it to restart now, but it starts over. we’re using stop all sounds on the back button

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 22, 2003, 12:25am UTC](https://forum.kirupa.com/t/music-problem/23742/5 "2003-06-22T00:25:20Z")

</div>

i still cant get the idea… can u explain it more clear?  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 22, 2003, 9:55am UTC](https://forum.kirupa.com/t/music-problem/23742/6 "2003-06-22T09:55:32Z")

</div>

if you put your sounds in the frames then add an extra frame with stopallsounds;).If the sound is loaded through a script then you simple say something like inside the button that controls the sound:  
loop2.stop();  
loop1.start(0, 99);

I usually make a lot of functions(especially if i have a lot of loops) and simply control the loops with the functions.:thumb:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 22, 2003, 7:31pm UTC](https://forum.kirupa.com/t/music-problem/23742/7 "2003-06-22T19:31:48Z")

</div>

alright, here’s the file:

[http://www.error42.com/test1.swf](http://www.error42.com/test1.swf)

it plays the first time from the start and can be turned off and on again from the horseman on the right, the satyr.

if you go threw it, into the castle and then again threw rooms then try to go back with the arrow at the bottom left the music stops and starts over again which sounds bad. we want it to continually play threwout the whole thing without starting over again.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 22, 2003, 7:34pm UTC](https://forum.kirupa.com/t/music-problem/23742/8 "2003-06-22T19:34:25Z")

</div>

well you dont say how your loading your sound file. are you loading it dynamically or by attach.sound , and where are u declaring this? hit me on AIM i wil be on for a few
