Answered
What is AS for button function
Hello folks,
I just used a www.gotoandlearn.com tutorial to create these cool animated buttons. Buttons are movie clips and they changing on roll over and roll out states. Everything works great, but since this is not a regular button, i do not know, how to assign a button function, so on release, viewer would be taken to another page.
this is AS I did for that animated button 1 :
b1.onRollOver = over;
b1.onRollOut = out;
b1.buttText.buttonText.text = "HOME";
function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(11);
}
that is AS for button acually being animated and it works great.
But when I try to to assign a regular
on(release){
_root.gotoAndPlay(2);
}
it says that button insance is allowed only on buttons. But this is a movie clip. So how coud I do this?
Do I have to assign another function, something like b1.onRelease = something?;
Thank you so much and please, keep in mind that I am a beginner. Thank you so much for your help.
Janek
I just used a www.gotoandlearn.com tutorial to create these cool animated buttons. Buttons are movie clips and they changing on roll over and roll out states. Everything works great, but since this is not a regular button, i do not know, how to assign a button function, so on release, viewer would be taken to another page.
this is AS I did for that animated button 1 :
b1.onRollOver = over;
b1.onRollOut = out;
b1.buttText.buttonText.text = "HOME";
function over() {
this.gotoAndPlay(2);
}
function out() {
this.gotoAndPlay(11);
}
that is AS for button acually being animated and it works great.
But when I try to to assign a regular
on(release){
_root.gotoAndPlay(2);
}
it says that button insance is allowed only on buttons. But this is a movie clip. So how coud I do this?
Do I have to assign another function, something like b1.onRelease = something?;
Thank you so much and please, keep in mind that I am a beginner. Thank you so much for your help.
Janek
