# Embedded Movie Sound

**URL:** https://forum.kirupa.com/t/embedded-movie-sound/156418
**Category:** Uncategorized
**Created:** [July 25, 2005, 6:55pm UTC](https://forum.kirupa.com/t/embedded-movie-sound/156418 "2005-07-25T18:55:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![LoungeActx](https://avatars.discourse-cdn.com/v4/letter/l/71c47a/32.png) [@LoungeActx](https://forum.kirupa.com/u/LoungeActx)
#### Post date: [July 25, 2005, 6:55pm UTC](https://forum.kirupa.com/t/embedded-movie-sound/156418/1 "2005-07-25T18:55:36Z")

</div>

Hey guys…I have a question about embedded movie files. I have embedded a movie into my .swf and I am looking at making a mute button. I can get the movie to mute, however, unmuting it just isn’t working for some reason. I don’t see any flaws in my logic…so I was wondering if you guys could take a look at this code and let me know if i’m making a stupid mistake?

> 

this.soundIsOn = true;  
this.audio = new Sound();  
if (this.fso.data && this.fso.data.volume != null) {  
this.audio.setVolume(this.fso.data.volume);  
this.soundIsOn = this.fso.data.volume \> 0;  
this.wave1.\_alpha = this.fso.data.volume;  
this.wave2.\_alpha = this.fso.data.volume;  
}

//animation crap  
this.onRollOver = function()  
{  
this.gotoAndStop(2);  
};  
this.onRollOut = function()  
{  
this.gotoAndStop(1);  
};  
this.onPress = function()  
{  
this.gotoAndStop(3);  
};

//muting process + animation crap  
this.onRelease = function()  
{  
if (this.soundIsOn) {  
// volume settings  
this.audio.setVolume(0);  
this.soundIsOn = false;  
this.fso.data.volume = 0;  
//alpha fade for sound waves  
this.wave1.\_alpha = this.fso.data.volume;  
this.wave2.\_alpha = this.fso.data.volume;  
} else {  
//volume settings  
this.audio.setVolume(100);  
this.soundIsOn = true;  
this.fso.data.volume = 100;  
//alpha fade for sound waves  
this.wave1.\_alpha = this.fso.data.volume;  
this.wave2.\_alpha = this.fso.data.volume;  
}  
this.fso.flush();  
this.gotoAndStop(1);  
};  
this.onReleaseOutside = this.onRollOut;  
stop();
