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();