Hi - am rusty on Flash so this will be easy but I am getting a mess. Can you tell me the right way to do this. (please!)
I have 3 movieclips, and 3 buttons, all on main stage.
Each button plays a MC. What I'd like is that if button1 plays MC1 (which stops at end of its own timeline), when button2 is clicked MC2 plays, and MC1 plays in reverse back to its frame1.
I can get each MC to play on each corresponding button click, and I have used the code (below) I found from a tuturial to reverse a MC (not that I understand how it works..), but it means that once it has run once, when you click the same button to replay the MC for another time, it doesn't work.
What do I need to add to make this work? Or am I missing the point....is there an easier way to do this....? Do I need to update the stage or something...how do I do that?
*************
I have this in my MC action:
onClipEvent (load) {
stop ();
var speed = 1;
var direction;
}
onClipEvent (enterFrame) {
if (direction == "ff") {
gotoAndStop (_currentframe+speed);
} else if (direction == "rr") {
gotoAndStop (_currentframe-speed);
}
and this in my button onpress:
on (press) {
_root. MC1 .direction = "ff";
}
on (press) {
_root. MC1 .direction = "rr";
}
Thanks if you can help!
Andrew.
I have 3 movieclips, and 3 buttons, all on main stage.
Each button plays a MC. What I'd like is that if button1 plays MC1 (which stops at end of its own timeline), when button2 is clicked MC2 plays, and MC1 plays in reverse back to its frame1.
I can get each MC to play on each corresponding button click, and I have used the code (below) I found from a tuturial to reverse a MC (not that I understand how it works..), but it means that once it has run once, when you click the same button to replay the MC for another time, it doesn't work.
What do I need to add to make this work? Or am I missing the point....is there an easier way to do this....? Do I need to update the stage or something...how do I do that?
*************
I have this in my MC action:
onClipEvent (load) {
stop ();
var speed = 1;
var direction;
}
onClipEvent (enterFrame) {
if (direction == "ff") {
gotoAndStop (_currentframe+speed);
} else if (direction == "rr") {
gotoAndStop (_currentframe-speed);
}
and this in my button onpress:
on (press) {
_root. MC1 .direction = "ff";
}
on (press) {
_root. MC1 .direction = "rr";
}
Thanks if you can help!
Andrew.