# Help with SWFAddress AS2

**URL:** <https://forum.kirupa.com/t/help-with-swfaddress-as2/303800>\
**Category:** flash\
**Created:** [January 27, 2010, 7:41am UTC](https://forum.kirupa.com/t/help-with-swfaddress-as2/303800 "2010-01-27T07:41:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![teroristd](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@teroristd](https://forum.kirupa.com/u/teroristd)\
**Post date:** [January 27, 2010, 7:41am UTC](https://forum.kirupa.com/t/help-with-swfaddress-as2/303800/1 "2010-01-27T07:41:50Z")

</div>

2010-01-19 15:47:18 UTC  
Hello guys,  
Excuse me for bad English. I try to use SWFAddress for non frame label based website with AS 2.0

I use this but don’t working

SWFAddress.setStrict(false);  
SWFAddress.onChange = function() {  
var value = SWFAddress.getValue();  
var path = SWFAddress.getPath();  
var id = SWFAddress.getParameter(‘id’);  
if (\_root.link \<\> 0 && value == ‘’) {

} else {  
switch(value){  
case “red”:  
b1(); // if use trace(value); tracing is work  
break;

case “green”:  
b2();  
break;  
}

}  
var title = ‘Site’;  
var names = SWFAddress.getPathNames();  
for (var i = 0; i \< names.length; i++) {  
title += ’ / ’ + names\*.substr(0,1).toUpperCase() + names\*.substr(1);  
}  
var id = SWFAddress.getParameter(‘id’);  
if (typeof id != ‘undefined’) {  
title += ’ / ’ + id;  
}  
SWFAddress.setTitle(title);  
}

This is on the main timeline.  
And in the buttons is that.

this.onRelease = function() {  
b1();  
};

function b1() {

SWFAddress.setValue(‘red’);  
\_root.play();  
\_root.link = 1;

}

Please help :\*( \*\*
