what i want to do is have a movie play i.e a rectangle move to point x from y at the click of a button, and at the click of another button, the rectangle should move from point x to point y; when the movie returns to point y, another frame should be loaded.
for example, check the following codes:
on frame 1:
stop;
butt.onRelease = function () {
gotoAndStop (2)
}
//butt is a instance name for a button//
on frame 2:
stop;
EndX = 200;
FinalX = 10;
mc.onEnterFrame = function () {
mc._x += (EndX - mc._x)/10;
}
butt.onRelease = function () {
mc._x += (FinalX - mc._x)/10;
if (mc._x == FinalX) {
gotoAndStop (3)
}
}
// mc is an instance name for a movieclip //
the movie will play forth and back but frame 3 will never come up; PLEASE IF YOU CAN HELP ME FIX THIS CODE I BEG YOU.