Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Why do you want to use buttons instead of movieclips? What feature are you looking to utilize that movieclips don't support? Have you considered using a button inside of a movieclip?
Copy link to clipboard
Copied
Well thats a good question and as i look at my issue i need to face it instead of running I want to animated it and found some documents on how to but my biggest issue is using swf address my external buttons dont work now they do nothing
Find more inspiration, events, and resources on the new Adobe Community
Explore Now