# Sound Looping question, please help

**URL:** <https://forum.kirupa.com/t/sound-looping-question-please-help/22928>\
**Category:** Uncategorized\
**Created:** [June 10, 2003, 7:06pm UTC](https://forum.kirupa.com/t/sound-looping-question-please-help/22928 "2003-06-10T19:06:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sentry43](https://avatars.discourse-cdn.com/v4/letter/s/b5ac83/32.png) [@Sentry43](https://forum.kirupa.com/u/Sentry43)\
**Post date:** [June 10, 2003, 7:06pm UTC](https://forum.kirupa.com/t/sound-looping-question-please-help/22928/1 "2003-06-10T19:06:45Z")

</div>

ok, this whole sound loops thing is driving me nuts.  
Basically, I have a large flash Movie, that loads other movies into it…it’s all gonna be placed on a CD for a presentation…so size doesn’t really matter.

Anyway, I have a sound loop when the movie first starts…  
On the first keyframe in the timeline i have:

[AS]  
firstSound=new Sound();  
firstSound.attachSound(“intro\_loop01”);  
\_root.firstSound.start(0,1);  
playing=true;  
[/AS]

I’m only looping it once, because it is like a minute long.  
I have two buttons to control the stop and play of this…they have the following actions applied to them:

STOP BUTTON:  
[AS]  
on (press) {\_root.firstSound.stop(“intro\_loop01”);  
playing=false;  
}  
[/AS]

START BUTTON:

[AS]  
on (release) {  
if (playing!=true) {  
\_root.firstSound.start(0,1);  
playing=true;  
}  
}  
[/AS]

All this works fine…you click stop…it stops the loop, click play, and it starts over.

However, I am loading other .swf files into empty movie clips…and when these load, I would like the music to change to something else.  
Now I got this to work…however…and here’s the real problem:  
my other sound loop is only like 6 seconds long…but I need it to be longer and fade out when I need it to.  
With the above code…is there a way to fade out the music?  
so I can fade in the next?  
I mean, if I set the loops to 999 or whatever, how do I fade this out?

Ok…be gentle…I’m very new to the sound part of Flash…seem to be struggling.

I’ve read tons of tutorials…but keep getting confused.

Please help…Please!

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 10, 2003, 7:59pm UTC](https://forum.kirupa.com/t/sound-looping-question-please-help/22928/2 "2003-06-10T19:59:05Z")

</div>

There’s a tut at Flashkit that explains how to go about doing what you are doing. It’s here:  
[http://www.flashkit.com/tutorials/Audio/Flash\_MX-Kenny\_Be-824/index.php](http://www.flashkit.com/tutorials/Audio/Flash_MX-Kenny_Be-824/index.php)  
I have not done what you are doing, but I understand. I believe you have to attach all the sounds in the beginning and then call them up from your external swf like \_root.secondSound.start(0,999); The fading in and out can be done with actionScripting and is explained in that tut.  
Good luck!! (-:
