# Alright I'm an idiot I need help \*\*sound problem\*\*

**URL:** <https://forum.kirupa.com/t/alright-im-an-idiot-i-need-help-sound-problem/92125>\
**Category:** Uncategorized\
**Created:** [October 13, 2003, 5:20pm UTC](https://forum.kirupa.com/t/alright-im-an-idiot-i-need-help-sound-problem/92125 "2003-10-13T17:20:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dynastyjp](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@dynastyjp](https://forum.kirupa.com/u/dynastyjp)\
**Post date:** [October 13, 2003, 5:20pm UTC](https://forum.kirupa.com/t/alright-im-an-idiot-i-need-help-sound-problem/92125/1 "2003-10-13T17:20:36Z")

</div>

For some reason working with sound via actionscript just boggles my mind and if anyone points me to the extensive tutorial on [flashkit.com](http://flashkit.com) (i forgot his name) I’ll scream. It can’t possibly be as hard as I’m making it out to be to work with sound. I just need a push i nthe right direction. :sigh: All I’m trying to do this…I can attach sound just fine that’s the only part I do get. All I’m trying to do is this I have too attached sounds in a MC called “myloop” one called “thunder” the other “intro” thunder is just a quick 3-4 second sound effect…no need to worry about that. But what I need to do is have “intro” fade out when a button called “artist” is clicked…then when that button is clicked my external .swf will load and “intro2” to fade in and start playing. Sounds easy? It probably is; just not to me.

Now I have this wonderful AS from the tutorial mentioned above which reads as follows:

//copyright August 2002 by Kenny Bellew - [kennybellew@hotmail.com](mailto:kennybellew@hotmail.com)  
this.onEnterFrame = function () {

//  
//Fade In  
//  
if (fadeIn01==1) {  
// fadeIn01 can be set to 1 when a button is  
// pressed, when a frame is reached or many other ways.

```
_root.myLoop.setVolume(myLoopVolume); 
// Sets the volume for the sound object "myLoop" 
// to the variable "myLoopVolume" every time the 
// frame is entered during the movie clip loop.

myLoopVolume=myLoopVolume+5;
// Increments the variable "myLoopVolume" by 5. 
// Increase or decrease this to change the speed of 
// the fade from 0 to 100.

```

if (myLoopVolume\>99) {  
fadeIn01=0;  
// This stops the “myLoopVolume” from incrementing  
// by making the if-statement false once the volume  
// reaches 100%.

} //Closes 2nd fadeIn if-statement  
} //Closes 1st fadeIn if-statement  
//  
//Fade Out  
//  
if (fadeOut01==1) {  
\_root.myLoop.setVolume(myLoopVolume);  
myLoopVolume=myLoopVolume-5;  
if (myLoopVolume\<5) {  
\_root.myLoop.stop(“myLoop01”);  
fadeOut01=0;  
}  
}

and the Sound Objects:

//Grewell–Christia-1105\_hifi.mp3 - freeware from Flashkit  
myLoop = new Sound(myLoopMc);  
myLoop.attachSound(“myLoop01”);  
myLoopVolume=0  
myLoop.setVolume(myLoopVolume);

and the button:  
on (press) {  
fadeOut01=1  
}

So I figured great! I can just swap some names out and it’ll work perfectly!..no…my sound quit working completely.

:puzzle:

I’m assuming this script needs to be placed in the \_root timeline and not inside the MC “myloop.” Correct, what am I doing wrong? I’ve been trying to figure out sound for ages and I just don’t get it. Help??? ☹ please?
