# Help with SWFAddress code

**URL:** https://forum.kirupa.com/t/help-with-swfaddress-code/261360
**Category:** Uncategorized
**Created:** [May 26, 2008, 10:31pm UTC](https://forum.kirupa.com/t/help-with-swfaddress-code/261360 "2008-05-26T22:31:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![macan77](https://avatars.discourse-cdn.com/v4/letter/m/51bf81/32.png) [@macan77](https://forum.kirupa.com/u/macan77)
#### Post date: [May 26, 2008, 10:31pm UTC](https://forum.kirupa.com/t/help-with-swfaddress-code/261360/1 "2008-05-26T22:31:12Z")

</div>

Please help me make this code work, I’m missing something…

```auto
var _loc1;

SWFAddress.onChange = function ()
{
    if (!addressChange)
    {
        var _loc1 = SWFAddress.getValue();
        if (_loc1 == "")
        {
            _loc1 = "/domov/";
        } // end if
        switch (_loc1)
        {
            case "/domov/":
            {
                domov.onRelease();
                break;
            } 
            case "/produkti/":
            {
                produkti.onRelease();
                break;
            } 
            case "/members/":
            {
                members_mc.onRelease();
                break;
            } 
            case "/transactions/":
            {
                transactions_mc.onRelease();
                break;
            } 
            case "/articles/":
            {
                articles_mc.onRelease();
                break;
            } 
            case "/contactus/":
            {
                contactus_mc.onRelease();
                break;
            } 
        } // End of switch
    } // end if
    addressChange = false;
};

//handleRelease("domov");

stop();

SWFAddress.setStatus = function (status)
{
    if (this._availability)
    {
        flash.external.ExternalInterface.call("SWFAddress.setStatus", status);
    } // end if
};

SWFAddress.resetStatus = function ()
{
    if (this._availability)
    {
        flash.external.ExternalInterface.call("SWFAddress.resetStatus");
    } // end if
};

handleRelease("domov");
//stick("home");

domov.onRollOver = function () {
    rollover("domov");
    SWFAddress.setStatus('/domov/');
};

domov.onRollOut = function () {
    rollout("domov");
    SWFAddress.resetStatus();
    };

domov.onRelease = function() {
    handleRelease("domov");
    addressChange = true;
    SWFAddress.setValue('/domov/');
    SWFAddress.setTitle("Tehnobiro / domov ");
    
};

produkti.onRollOver = function () {
    rollover("produkti");
    SWFAddress.setStatus('/produkti/');
};

produkti.onRollOut = function () {
    rollout("produkti");
    SWFAddress.resetStatus();
};

produkti.onRelease = function() {
    handleRelease("produkti");
    addressChange = true;
    SWFAddress.setValue('/produkti/');
    SWFAddress.setTitle("Tehnobiro / produkti");
};

function rollover(movieName) {
    if (currentMovie != movieName) {
        eval(movieName).gotoAndPlay("over");
    }
}

function rollout(movieName) {
    if (currentMovie != movieName) {
        eval(movieName).gotoAndPlay("out");
    }
}

function handleRelease(movieName)
{
    if (_root.currMovie == undefined) {
        _root.currMovie = movieName;
        _root.myLoader.loadMovie(movieName + ".swf");
    } else if (_root.currMovie != movieName) {
        if (_root.myLoader._currentframe >= _root.myLoader.midframe) {
            _root.currMovie = movieName;
            _root.myLoader.play();
            stick(movieName);
        }
    }
}

function stick(movieName) {
    if (currentMovie != movieName) {
        eval(currentMovie).gotoAndPlay("out");
    } 
    currentMovie = movieName;
    eval(currentMovie).gotoAndStop(7);
}

```

Any help will be appreciated!
