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 :*( **