PDA

View Full Version : change action in a button


PABobo
02-17-2006, 09:16 PM
Is there a way to change the default action in the button?

This is what i have:

on(press){

getURL(this.link, _self);
}
on(rollOver){
this._parent.gotoAndPlay("o");
}
on(rollOut){
this._parent.gotoAndPlay("t");
}
when a person clicks on it it goes to a new page, now what i need this button to do isa change to this.

on(press){

getURL(this.link, _self);
}
on(rollOver){
this._parent.gotoAndPlay("o");
}
on(rollOut){
this._parent.gotoAndPlay("o");
}
is there a way to do this?

my function is this in Frame 1

function secondFrame(myPath, myParent) {
if (myParent.page == myPath._name) {
myPath.gotoAndPlay("o");
myPath.button._visible = true;
myParent.headers.gotoAndPlay(myPath._name);
}
}

Sunny13
02-20-2006, 05:02 AM
Yeah this can be done easily.. here is an example ... a_btn.onRelease = function() {
trace("hello");
};
b_btn.onRelease = function() {
a_btn.onRelease = function() {
trace("Thanks");
};
};... don't write the code on the button it will be run along with the changed code