Jump to content
  • Advertisement
  • entries
  • comments
  • views

mc_tween fills me with love

Sign in to follow this  


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;


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.
Sign in to follow this  


Recommended Comments

I hope everyone uses it since "It saves the world (TM)" [smile]

"easeInBounce" is so cool.

Share this comment

Link to comment
1 Samuel 16 : 19
Wherefore Saul sent messengers unto Jesse, and said, Send me David thy son, which is with the sheep.


Share this comment

Link to comment
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?

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!