Code explanation:
The initApp() method does is to add mouse events to the start/pause buttons for both examples, and initialize the
two examples tweens.
The startExample1(), startExample2(), pauseExample1(), pauseExample2() are event methods used by the start/pause buttons.

Example 1:
Instance names which we shall tween: obj1, obj2, obj3.
Button instance names: start1, pause1.
This example displays 3 geometric shapes which can tween by using only one tween instance and
a MultipleTween class.

The method animateExample1() does the following:
Creates a single GTween instance named ‘geometricShapesTween‘, and a MultiTween instance.
The MultiTween is used to apply multiple tweens on the specified movieclip instances in the application,
in our case the geometric shapes named ‘obj1, obj2 and obj3‘.

Example 2:
Instance name: packman.
Button instance names: start2, pause2.
Mr ‘packman‘ is a movieclip instance, which has a timeline frame animation - of his mouth opening and closing.

The method animateExample2() does the following:
Controls packman tweens by using the GTween and TweenTimeline classes.
And also can move his moouth, move from left to right, jump up and down.
Here are the names of the tweens we use: packmanAnimationTween, jumpUpTween, jumpDownTween.
The TweenTimeline specifies, using an Array, the order of when those tweens should take place and also the time when to do it.

Download application


www.adriansule.com