mc_tween fills me with love

Published July 26, 2005
Advertisement
Attn, David. No mention of you in this one either.

Actually, I might sneak a dig in somewhere. You probably should read all the way through just in case.



Flash now has built-in tweening classes that allow you to do things to make graphics bounce around easily. Problem is, like much of the Flash class library, it's buggy and sometimes it doesn't work as advertised.

Enter MC Tween. A tween class alternative that works much better and is way easier to use than the ones built in to Flash.

Using it is as simple as replacing your existing "move the sprite" code:

mySprite._x = 100;

with:

mySprite.xSlideTo(100, 2, "easeOutElastic");

Rather than moving the object to 100 instantaneously, it'll now slide the object to position 100 over a period of two seconds using an springy elastic effect.

It works great, and it's much simpler than the built-in ones. There are plenty of functions to apply these tweens to almost anything (position, scale, alpha, rotation, etc). You can also pass arrays as elements if you want to tween several items simultaneously.

Check out the "animation types" and "examples" pages to see some cool effects done with it.

Highly recommended. Check it out.



Oops, Sorry David. It didn't seem to mention you at all. Maybe next time.

You might wanna check out the comments. Maybe somebody will say something damaging there.
0 likes 4 comments

Comments

Mithrandir
David is French for "Penis".


Though I could be wrong (I usually am).
July 26, 2005 03:02 PM
noaktree
I hope everyone uses it since "It saves the world (TM)" [smile]

"easeInBounce" is so cool.
July 26, 2005 04:05 PM
JTippetts
Quote:1 Samuel 16 : 19
Wherefore Saul sent messengers unto Jesse, and said, Send me David thy son, which is with the sheep.

[oh]
July 26, 2005 05:36 PM
noaktree
D - Dumb
A - Ars
V - Vatican Puppet
I - Intentionally Being
D - Disruptive

For some reason I keep hearing H.A.L. ask, "David...what are you doing David?" It's creeping me out.

edit.. or was that teddy talking to David in that A.I. movie?
July 27, 2005 12:00 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement