- Home
- Articles
- Best Practices
- AS3 Multiple Tweens

Adrian Sule
Hi, I'm a Romanian Flash Developer, based in the UK, and I probably have a bunch of articles in my head that need to be laid down in writing. Graduated a Bachelor Degree in Computer Science, and have been working within Digital Agencies for the last 4 years now, in the Creative team as a Flash Developer and sometimes Designer. http://www.adriansule.com
View all articles by Adrian SuleCode 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.
Spread The Word
1 Response to "AS3 Multiple Tweens" 
|
said this on 29 Aug 2009 5:06:25 AM CST
This is useful stuff for
|


Author/Admin)