# Controlling sound with-in a class

**URL:** <https://forum.kirupa.com/t/controlling-sound-with-in-a-class/224291>\
**Category:** flash\
**Created:** [April 30, 2007, 11:46pm UTC](https://forum.kirupa.com/t/controlling-sound-with-in-a-class/224291 "2007-04-30T23:46:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cookingkym](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cookingkym](https://forum.kirupa.com/u/cookingkym)\
**Post date:** [April 30, 2007, 11:46pm UTC](https://forum.kirupa.com/t/controlling-sound-with-in-a-class/224291/1 "2007-04-30T23:46:39Z")

</div>

Hey People.

Im having trouble with controlling my sounds with-in a class.  
Okay so i have a class with my sites sounds with in it.

What i want is a button that can control all of those sounds within the class, so what i have a button and when i click it it turns off those sounds with-in the class and back on.

So i need to know how to a start and stop the class sounds. make sense??

This is my set up.

\_global.interfaceClass=function(){}

interfaceClass.prototype.gameSounds=function(){

```
home = new Sound();
home.loadSound("intro.mp3",true);

futbol=new Sound();
futbol.loadSound("futbul.mp3",false);

desde = new Sound();
desde.loadSound("desde.mp3",false);    

 volume = (10);

```

}

home.start()

ui = new interfaceClass();  
ui.gameSounds();

i thought this was was but its tricky,

Any help is always appreciated!!!

Many thanks

ck
