Dachef
01-08-2001, 10:59 AM
ok I have been working on an actionscript that destroys that annoying button reclick problem, so commonly found.
Basically i want to have it so if a button is clicked twice..the animation that takes place does not repeat itself. I thought i could do this with variables.
I just started using Flash 5. this might be an easy question, or a simple mistake on my part. but go easy on me.
in the first frame of my movie i have a set variable action that sets the variable x to 0. it looks like this:
x = 0;
in the first button i have the following:
on (release) {
if (x = 1) {
tellTarget ("mc") {
stop ();
}
} else {
tellTarget ("mc") {
gotoAndPlay (2);
x = 1;
}
}
}
what am i doing wrong..and how can i fix it. or if i am going about it the wrong way..what can i do..
i appreciate your help.
Dachef
Basically i want to have it so if a button is clicked twice..the animation that takes place does not repeat itself. I thought i could do this with variables.
I just started using Flash 5. this might be an easy question, or a simple mistake on my part. but go easy on me.
in the first frame of my movie i have a set variable action that sets the variable x to 0. it looks like this:
x = 0;
in the first button i have the following:
on (release) {
if (x = 1) {
tellTarget ("mc") {
stop ();
}
} else {
tellTarget ("mc") {
gotoAndPlay (2);
x = 1;
}
}
}
what am i doing wrong..and how can i fix it. or if i am going about it the wrong way..what can i do..
i appreciate your help.
Dachef