# swfAddress issues

**URL:** <https://forum.kirupa.com/t/swfaddress-issues/268964>\
**Category:** Uncategorized\
**Created:** [August 20, 2008, 10:45pm UTC](https://forum.kirupa.com/t/swfaddress-issues/268964 "2008-08-20T22:45:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shane\_c](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@shane\_c](https://forum.kirupa.com/u/shane_c)\
**Post date:** [August 20, 2008, 10:45pm UTC](https://forum.kirupa.com/t/swfaddress-issues/268964/1 "2008-08-20T22:45:52Z")

</div>

Ok, so I’m trying out swfAddress (version 2.1) for the first time, and I’m having some issues…

[Here’s my really simple test swf.](http://bravo.unisonplatform.com/%7Ermdg/)

The left block is called button1\_mc, the right block is called button2\_mc, and the top, smaller one is called buttonHome\_mc. They are all contained within menu\_mc.

When you click button1\_mc, the whole thing moves left (this would be the ‘page1’ application state). Same thing for button2\_mc, but it moves right. When you click buttonHome\_mc, it moves back to the center (the ‘/’ application state).

And here’s my AS:

```auto

import gs.TweenMax;
import SWFAddress;

// Save the default menu x-position
menu_mc.homeX = menu_mc._x;

// Make an array with key as swfaddress value, value as the button object
swfPages = new Array();

// Function that sets page and shiftX value for a button, and adds it to the swfPages array
addPage = function(mc, page, shiftX) {
    mc.page = page;
    mc.shiftX = shiftX;
    swfPages[page] = mc;
    }
addPage(menu_mc.buttonHome_mc, '/', 0);
addPage(menu_mc.button1_mc, '/page1/', -50);
addPage(menu_mc.button2_mc, '/page2/', 50);

// Set button functions
buttonFunction = function(button) {
    button.onRelease = function() {
        changePage(this);
        SWFAddress.setValue(this.page);
    }
    button.onRollOver = function() {
        SWFAddress.setStatus(this.page);
    }
    button.onRollOut = function() {
        SWFAddress.resetStatus();
    }
};
buttonFunction(menu_mc.buttonHome_mc);
buttonFunction(menu_mc.button1_mc);
buttonFunction(menu_mc.button2_mc);

// Page Change Function
changePage = function (swfAddressValue) {
    var button = swfPages[swfAddressValue];
    var toX = menu_mc.homeX + button.shiftX;
    TweenMax.to(menu_mc, 0.5, {_x:toX});
};

SWFAddress.onChange = function() {
    changePage(SWFAddress.getValue());
}

```

Everything works as expected in the swf file, and when you hover over the buttons you can see the correct URL show up in the status bar - but when you click, the URL doesn’t change.

Not sure what I’m doing wrong… Thanks for any help you can give me 🍺
