This allows to apply motion tweens totally dynamically to
movieclips either without writing anything on them for the
add-on version, or just with the following code on
the movieclip to tween for the stand-alone version:
onClipEvent (enterFrame) {
onEnterFrame();
}
It's a MovieClip.prototype'd method called "dynTween"
that achieves it just with one action.
If you're using the add-on version, it uses TK Event Engine
internally. (TK Event Engine is also included in the fla)
And if not, it'll be assigning various values to the movieclip's
onEnterFrame
from the timeline where you code.
A usage example:
myMC.dynTween ( { duration: 40, _x: [400, "out"], _y: [200, "in"] } );
This will move "myMC" from the current position
to (400,200) during 40 frames with easing effects, "out"
for _x and "in" for _y.
One cool thing with this is that you can apply different easing
types to different properties, that is, you can, for example,
tween a movieclip along a curved path by assigning different
easing types to _x and _y, as seen in the above example.
If you would do that with normal frame tween, you'd have to
either have a motion guide layer, or have the movieclip nested
in another and have tween frames on both clips, like child
clip's tween for _x and parent clip's for _y each with a different
easing type from the other.
Another cool thing is that the file size of the published
swf will be dramatically smaller than one with normal frame
tweens.
And now this allows to write a series of motion tweens in
one action.
(See Usage example 2 and 3 below)
Below is a swf file of the stand-alone version that shows
some usage examples.