AS3 button question swfaddress
I am trying to transition from as2 to as3 its been going very slow I have added as3 swfadress successfully my problem is that I dont want to use movieclips instead of buttons here is what i have
i have this on frame 2
// SWFAddress actions
function btnClick(e:MouseEvent) {
SWFAddress.setValue(e.target.deepLink);
}
function btnRollOver(e:MouseEvent) {
SWFAddress.setStatus(e.target.deepLink);
}
function btnRollOut(e:MouseEvent) {
SWFAddress.resetStatus();
}
// SWFAddress handling
function handleSWFAddress(e:SWFAddressEvent) {
try {
if (currentFrame == 2 && e.value == '/') {
play();
} else {
gotoAndStop('$' + e.value);
}
} catch(err) {
gotoAndStop('$/error/');
}
}
SWFAddress.addEventListener(SWFAddressEvent.CHANGE, handleSWFAddress);
stop();
then in the movie clips i have the below code
this.deepLink = '/home/';
this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, (parent as MovieClip).btnClick);
this.addEventListener(MouseEvent.ROLL_OVER, (parent as MovieClip).btnRollOver);
this.addEventListener(MouseEvent.ROLL_OUT, (parent as MovieClip).btnRollOut);
however using this setup I would like to use buttons instead of movieclips how do i accomplish this because in as3 you cannot add code in a button