Need to implement swfaddress

another question for you as3 gurus:

i have this code i set up to trap my id’s (which come from an xml file). i’m trying to set up swfaddress to load each activityid, then get my URLs working…

public function showActivityID(activityid:String):void {
            
            for (var i:uint = 0; i<thumbs.length; i++) {
                
                if (activityid == thumbs*.activityid) {
                    
                    displayEvent(thumbs*);
                }    
            }
        }

there’s this code i found in one of the swfaddress tutorials, but i need to modify it to work with my code. i’ve got a variable, swfVar, with the SWFAddress.getValue(); in my main class constructor, looking for ways to put it all together…

swfVar = SWFAddress.getValue();

function btnClick(e:MouseEvent) {
    SWFAddress.setValue(e.target.deepLink);
}

function handleSWFAddress(e:SWFAddressEvent) {
    try {
        if (currentFrame == 2 && e.value == '/') {
            play();
        } else {
            gotoAndStop('$' + e.value);
        }
    } catch(err) {
        gotoAndStop('$/error/');
    }
    var title:String = 'SWFAddress Website';    
    for (var i = 0; i < e.pathNames.length; i++) {
        title += ' / ' + e.pathNames*.substr(0,1).toUpperCase() + e.pathNames*.substr(1);
    }
    SWFAddress.setTitle(title);
}
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);
stop();