# Swfaddress 2.4, simple eg. not working

**URL:** https://forum.kirupa.com/t/swfaddress-2-4-simple-eg-not-working/309418
**Category:** Uncategorized
**Created:** [May 14, 2010, 1:32pm UTC](https://forum.kirupa.com/t/swfaddress-2-4-simple-eg-not-working/309418 "2010-05-14T13:32:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)
#### Post date: [May 14, 2010, 1:32pm UTC](https://forum.kirupa.com/t/swfaddress-2-4-simple-eg-not-working/309418/1 "2010-05-14T13:32:29Z")

</div>

Hello … I can’t get this to work.  
Assuming, all is installed etc (I am not getting any errors)

Each time I click my button, the **SWFAddress.onChange = function()** doesn’t activate which is where the problem lies…

Can someone look at my simple code, and maybe help me out!?

```auto
import com.asual.swfaddress.SWFAddress.*;

var posnum:Number = 0;
var loc_ary:Array = new Array("one","two","three");

SWFAddress.onChange = function() 
{
	//var address_value = SWFAddress.getValue();
	trace(SWFAddress.getValue())
	switch (loc_ary[posnum]) 
	{
		case "one":
			s_mc._x = 100;
		break;
		
		case "two":
			s_mc._x = 300;
		break;
		
		case "three":
			s_mc._x = 500;
		break;
	}
}

nxt_mc.onRelease = function()
{
	posnum++;trace(posnum);
	if(posnum >= loc_ary.length)
	{
		posnum = 0;
	}
	SWFAddress.setValue("address /" + loc_ary[posnum]);
}

```

much appreciated - for something making me very worried why I can’t get working!
