MC Tween: it saves the world.™

Home | Using MC Tween | Documentation | AS2 usage notes | Animation Types | Downloads | Examples | Extensions | Author & Disclaimer | Links

Examples

These are examples and source files to do some simple tasks with MC Tween. The objective isn't to do something cool or original, but rather to show how to do something easily. Most of code is wrote to be simple, focusing on tweening itself, instead of creating a complex movie and making the tweening a minor part of it. See this as concept tweenings and syntax samples.

All source files are .FLA files compressed in .ZIP format. They were created on a PC but should execute without a problem on Macs. Also notice that all these examples' source files need the file "mc_tween2.as" to be available for #including on the user's machine when recompiling.

I'll add new examples as I think of and do them - again, simple stuff. I don't want to paste a whole website here and make it hard for people to understand how MC Tween mixes with the rest of the code, so I'll simply focus on simple stuff, done from scratch. New examples are added to the bottom of the list, in order. If you have some idea you'd like to see done or have some example to submit, please contact me.

MovieClip Examples

Simple sliding menu | Preview (6kb) | Source (9kb)
A simple menu -- all menu items are at _alpha 50%. When rolled over, items get 100% of alpha and slide a bit to the right, going back to _alpha 50% and to their original position when rolled out.
Commands used: <MovieClip>.alphaTo(), <MovieClip>.tween().

Activated menu | Preview (6kb) | Source (4kb)
Another menu. This one has a simple activation feature to turn menu options on or off; this is actually a bit more than just a raw MC Tween example, but I recon it could be useful as a reference. Fully commented.
Commands used: <MovieClip>.tween(), <MovieClip>.alphaTo().

Graphic tracer | Preview (6kb) | Source (9kb)
This is the source to the graph movie used on the animation types section. Given a different animation type, it animates a value differently and reflects that on a graph and on a sliding movieclip. Inspired by Robert Penner's easing demo, this one was done for a better explanation of each different type on this site.
Commands used: <MovieClip>.tween().

Ball scaling menu | Preview (5kb) | Source (8kb)
A menu to demonstrate some of the animation types available - a bit cartoony. Clicking on each item makes it disappear.
Commands used: <MovieClip>.scaleTo(), <MovieClip>.alphaTo().

Bezier Ball Bouncing | Preview (5kb) | Source (7kb)
A quick demonstration of callback functions and bezier sliding to simulate a ball bouncing on two surfaces.
Commands used: <MovieClip>.tween(), <MovieClip>.bezierSlideTo().

Falling leaves | Preview (6kb) | Source (12kb)
The classic example of falling leaves, MC Tween style. Shows leaves falling down and rotating left and right when doing so - both done by tweening methods. Also applicable to falling snow flocks... I think.
Commands used: <MovieClip>.rotateTo(), <MovieClip>.ySlideTo().

Clock Hands | Preview (6kb) | Source (10kb)
Using tweening commands to rotate the hands of a clock based on duration time. Does not use the real time - so it's a bit like a chronometer.
Commands used: <MovieClip>.rotateTo().

Clock Hands Two | Preview (6kb) | Source (15kb)
Other example using the clock. This time, using the real CPU time - tweening is used to emulate an old analog clock's hands movements, with a certain inertia or snap. It's also used to rotate the pendule below the clock. There's a few problems with the pendule by the way.. it may gag a little on the first times it revolves. I did this in a rush - it would need some time verification for a proper start.
Commands used: <MovieClip>.rotateTo().

Flash 8 Filter Tests | Preview (10kb) | Source (6kb)
This is the Flash 8 file I used for testing the new Flash 8 filters shortcuts. It's a good example of several different filter tweening types.
Commands used: <MovieClip>.blurTo(), <MovieClip>.glowTo(), <MovieClip>.bevelTo() and a few others.

Sound Examples

Sound panning and volume fading | Preview (41kb) | Source (763kb)
An example on using fade and panning on sounds: click on a numbered button to fade the current sound volume to that volume, or on the "L" and "R" buttons to pan volume to left or right, simulating positional audio. Commands used: <Sound>.panTo(), <Sound>.volumeTo().

 

MC Tween· Zeh Fernando, 2003-2006 · Proudly hosted at DreamHost · Disclaimer