Archive for September, 2007
TextAnimation
I just created a class to animate texts in AS3. Animations such as group94 or yugop
I’m using Robert Penner’s easing equations, so it’s really easy to customize the animations.
Here’s an example.
[code lang="actionscript"]
TextAnimation.animate("Welcome to labs.hellokeita.com", "Welcome to labs.hellokeita.com", {
textField: tField,
textFormat: tFormat,
step: 4,
time: 3,
delay: 1,
characters: "0123456789-#",
transition: "easeInOutCubic"
});
[/code]
So, as you see, I can set the transition equation, time and delay, also the random character set that will be used.
The Step
parameter is the number of times that the random character will appear before it shows the right character.
You can also use HTML font tags and /n NewLine Characters as bellow.
[code lang="actionscript"]
TextAnimation.animate("Welcome to labs.hellokeita.com", "Welcome to labs.hellokeita.com", {
textField: tField,
step: 4,
time: 3,
delay: 1,
characters: "0123456789-#",
transition: "easeInOutCubic"
});
[/code]
The coding is a little dirty, but I think it’s pretty good for a couple hour work.
