# Need mute button in flash to carry over to other html pages

**URL:** <https://forum.kirupa.com/t/need-mute-button-in-flash-to-carry-over-to-other-html-pages/294773>\
**Category:** flash\
**Created:** [August 19, 2009, 5:46pm UTC](https://forum.kirupa.com/t/need-mute-button-in-flash-to-carry-over-to-other-html-pages/294773 "2009-08-19T17:46:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heerefishyfish](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@Heerefishyfish](https://forum.kirupa.com/u/Heerefishyfish)\
**Post date:** [August 19, 2009, 5:46pm UTC](https://forum.kirupa.com/t/need-mute-button-in-flash-to-carry-over-to-other-html-pages/294773/1 "2009-08-19T17:46:37Z")

</div>

I’ve found an example of this

[http://www.sitepal.com/showcases](http://www.sitepal.com/showcases)

If you click on the mute button at the top, then navigate to another page, the mute button stays clicked.

I have a decompiler, and pulled the code out of it. See below:

```auto
function acknowledge(method)
{
    sLC.send("lc_out_" + tStamp, "acknowledge", method);
}

function muteHost(action)
{
    if (action) 
    {
        modSound.setVolume(0);
        vhost.stopSpeech();
        muteBtn.gotoAndStop(3);
        shellAudioLogic.mute(true);
        return;
    }

    modSound.setVolume(100);
    muteBtn.gotoAndStop(1);
    shellAudioLogic.mute(false);
}

function ctrlClick(obj, val)
{
    if ((__reg0 = obj) === "muteBtn") 
    {
        if (val == 1) 
        {
            muteHost(true);
        }
        else 
        {
            muteHost(false);
        }

        return;
    }
    else 
    {
        if (__reg0 === "stopBtn") 
        {
            vhost.gotoScene(lastIndex);
            talkEnded = null;
            vhost.stopSpeech();
            return;
        }
        else 
        {
            if (__reg0 === "replayBtn") 
            {
                forceMute = false;
                muteHost(false);
                if (homepage) 
                {
                    vhost.gotoScene(replaySlideIndex);
                }
                else 
                {
                    vhost.gotoScene(replaySlideIndex);
                }

                return;
            }
            else 
            {
                if (__reg0 !== "testBtn") 
                {
                    return;
                }

            }

        }

    }

    vhost.sayText("bla bla bla bla bla", 2, 2, 1);
    return;
}

function vhostLoadedDone()
{
    fakeLoader.gotoAndStop(1);
    fakeLoader._visible = 0;
}

System.security.allowDomain("vhss-c.oddcast.com", "vhss-a.oddcast.com", "www.oddcast.com", "www2.staging.oddcast.com", "vhost.oddcast.com", "vhost.staging.oddcast.com, oddcast.staging.oddcast.com, oddcast.dev.oddcast.com");
pedingTTS = false;
forceMute = false;
modSound = new Sound(this);
gender = "F";
replaySlideIndex = homepage ? 2 : 1;
api = new Object();
var rLC = new LocalConnection();
var sLC = new LocalConnection();
rLC.sayAudio = function (audio)
{
    api.sayAudio(audio);
    acknowledge("sayAudio");
}
;
rLC.stopSpeech = function ()
{
    api.stopSpeech();
    acknowledge("stopSpeech");
}
;
rLC.connect("lc_in_" + tStamp);
but.onRelease = function ()
{
    silenceHost.gotoAndPlay(2);
}
;
api.sayAudio = function (audio)
{
    muteHost(0);
    vhost.setStatus(1);
    vhost.sayAudio(audio);
}
;
api.stopSpeech = function ()
{
    talkEnded = null;
    this.called = true;
    vhost.stopSpeech();
}
;
sitepalPath = "/";
_debug3 = baseDir;
stop();
var shellAudioLogic = new AudioLogic(vhostURL, noGreeting == 1 ? 1 : cookieExists, homepage, vhost, this, contentName);

```

I can’t quite figure out how to implement this. Any ideas would be greatly appreciated.

Thanks!!
