Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reverse mc then start new mc play

Status
Not open for further replies.

Copierbw

Technical User
Sep 25, 2002
112
IE
I have 2 m/c's. Both of them are activated and played on seperate buttons. They also have seperate reverses to close them. My problem:
Once I press button for the one to open I would like the other one to reverse and close. Thats not issue but I would like the opening one to wait until the closing mc reached it's begining or frame 1. The idea is for the two not to overlap on the stage...Thanks..

You don't need eyes to see just the vision because there are always more ways and different answers to what we are used to...
 
hi

i think this will help u

//frame script
//btn1 & btn2 is button instance name
//mc1 & mc2 is movieclip names
//fps - 12 and animation inside the movie clip is for 2 sec down & reverse
//Inside mc 1 - 24 menu open - 25 to 48 reverse
//in 1 frame of Mc1 & mc2 stop() and 24 frame each mc one stop
//btn and mc is placed in the stage



btn1.onRelease = function() {
if (_root.mc2.flag1 == 1) {
_root.mc2.play();
id = setInterval(fun, 2000, "_root.mc1");
} else {
_root.mc1.play();
}
};
btn2.onRelease = function() {
if (_root.mc1.flag1 == 1) {
_root.mc1.play();
id = setInterval(fun, 2000, "_root.mc2");
} else {
_root.mc2.play();
}
};
function fun(mc) {
eval(mc).play();
clearInterval(id);
}



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top