Text animation sequence
Posted: June 11th, 2010 | Author: guindexA long time ago I want to talk about it, but for many things became impossible, so finally let’s talk about something very usefull to do with TextAnim. In the begining, when TextAnim became public we receive some question about how is possible to create sequences of text animation, and can TextAnim provide support for it?
So, that’s a good question, in the begining the class had a lot of extra thing, for effects, tween, alignment, text formating and many others, and one day we decide remove all that things and make TextAnim clear, with only one feature: “break apart the TextField” this is something really hard to do when you have a lot of code, so that’s reason to TextAnim has nothing for that, and even then we can’t scape of create a Tools class (TextAnimTool), naturaly all the other things that TextAnim has today are to make it to the best way.
Sequences are something really great, but looking closer, it’s out of original scope. We recommend that you make all your particular things manualy, because the class was design for things like that and it’s really simple. Special thanks to Lucas Motta that was the most faster guy, he sent a usefull class to do sequences at the first week, check out it here.
When we think about sequences, or crazy similar things, we have to consider a lot of things more then change text on a interval, change the text format size/font/color/align, play sounds, change time/interval/delay images, filters and so on, anything.
Here is one other example of sequence, with other rules, that’s nothing new but can be usefull too:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | //... public class TASequence extends Sprite { public var _sequence:Array; public var _i:int = 0; public var _tf:TextField; public var _fm:TextFormat; public var _ta:TextAnim; public function TASequence() { _fm = new TextFormat("myFontName", 32, 0xFF0000); _tf = new TextField(); _tf.autoSize = "left"; _tf.embedFonts = true; _tf.defaultTextFormat = _fm; addChild(_tf); _ta = new TextAnim(_tf); _sequence = [ {htmlText:"My text 1", interval:50, effects:my1Effect, next:5}, {htmlText:"FOR <font color=\"#d6156c\">DYNAMIC TEXT</font> ANIMATION", interval:50, effects:my2Effect, next:6}, {htmlText:"My other text 3", interval:30, mode:"random", effects:my3Effect, next:6} ]; playNext(); } public function playNext():void { _ta.effects = _sequence[_i].effects; _ta.interval = _sequence[_i].interval; _ta.htmlText = _sequence[_i].htmlText; _ta.blocksVisible = false; _ta.start(); if (_i < _sequence.length-1) setTimeout(playNext, _sequence[_i].next * 1000); _i ++; } } //... |
Download source
- TextAnim text sequence animation example: textanim_sequence.zip
- TextAnim latest version: downloads list
Filed under: TextAnim | Tags: actionscript, animation, as3, banner, flash, intro, motion, sequence, textfield, tweener | 10 Comments »

