Example TextAnim with texture

Posted: February 4th, 2010 | Author: guindex

Hey!

Get Adobe Flash player

Basically I created an instance of TextAnim with an initial effect and a pattern (you can apply some TextAnimTool useful tools). That receives the URL parameter with text. Then put some delays that simply change the property and start the animation again.

This is a quick example of use of TextAnim to demonstrate the basic operation of the Class. Sure, you can ready a bit more on documentation.


Create Bitmap and getting text by the parameters on loaderInfo

1
2
var pattern:Bitmap = new Bitmap(new MyBitmapData(0,0));
myTextField.text = loaderInfo.parameters.text;

Create TextAnim

1
2
3
4
5
6
7
8
import flupie.textanim.*;

var anim:TextAnim = new TextAnim(myTextField);
TextAnimTools.setPattern(anim, pattern);
anim.effects = myEffect;
anim.blocksVisible = false;

anim.start();

IMPORTANT! Don’t forget to embed the font that you want to use.

NOTE: The most important thing to note myEffect is a function, this function is called for each block of text, and must receive a TextAnimBlock as parameter, then create effect using the tween engine that you prefer (Tweener, BTween, GTween, Tweensy, TweenMax…)

Effect function

1
2
3
4
5
6
7
8
//create your animation effect...

function myEffect(block:TextAnimBlock):void {
  block.alpha = 0;
  block.x = block.posX - 40;
  block.scaleX = block.scaleY = 3;
  Tweener.addTween(block, {alpha:1, x:block.posX, _scale:1, time:.5});
}

DOWNLOAD

1 – Take an example like: textanim_pattern.zip
2 – You need to download the last version of TextAnim: TextAnim download list
3 – Do not forget to download your favorite tween engine separate. For this example I used Tweener

Filed under: TextAnim | Tags: , , , , | 5 Comments »

5 Comments on “Example TextAnim with texture”

  1. 1 Gabe said at 11:16 pm on March 23rd, 2010:

    This is awesome. Thank you!

  2. 2 nexo said at 9:25 pm on March 24th, 2010:

    OMG! awesome TxEff free alternative, tks!

  3. 3 TJ said at 2:52 pm on May 30th, 2010:

    Hi there

    First it’s a great class.

    I want to verify something, I know this under MIT but just checking again is it allow to use it for a flash sell stock ? .

    I just want to be sure before i use it, I appreciate your respond on the matter

  4. 4 guindex said at 1:23 am on May 31st, 2010:

    Hi TJ,

    Thank you, and sure! You can use on every project you have with no restriction.

  5. 5 adrian said at 1:15 pm on July 28th, 2010:

    Hi guindex,

    Congrats for creating this cool library.

    I like it so much that I’ve done a post about it on my blog (not sure if link will show):
    http://adriansule.com/blog/2010/07/flash-dynamic-text-animation/

    Thank you,


Leave a Reply