Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Playing Timeline Backwards

16 views
Skip to first unread message

TweeningPhool

unread,
Oct 1, 2005, 10:43:57 AM10/1/05
to
Pretty easy design, I'm sure you have heard this one before. I have one of my
forms fade in all of its objects one by one, then i want to be able to click a
button on the form and have it all fade out in the opposite order it came in.
Is this possible to do with actionscript? Boy I hope so. ^_^

kglad

unread,
Oct 1, 2005, 10:51:36 AM10/1/05
to
the code below the dotted line adds a new method (playF) to movieclips that
lets you direct any movieclip to play from frame m to n (forward or backward)
at any speed (your computer can handle).

to use:

yourMC.playF(m,n,ps);


--------------------------------------------------------------------------------
----
MovieClip.prototype.playF = function(m, n, fps) {
function playF2(mc) {
if (mc.m<mc.n) {
mc.nextFrame();
} else {
mc.prevFrame();
}
if (mc._currentframe == mc.n) {
clearInterval(mc.int);
}
updateAfterEvent();
}
this.m = m;
this.n = n;
this.fps = fps;
this.gotoAndStop(this.m);
clearInterval(this.int);
this.int = setInterval(playF2, 1000/this.fps, this);
};

kglad

unread,
Oct 1, 2005, 11:46:44 AM10/1/05
to
you're welcome.

TweeningPhool

unread,
Oct 1, 2005, 11:44:27 AM10/1/05
to
Wow you freakin rock dude. Works like a charm. Boy you just saved me hours and hours of tweening hell, lol.
0 new messages