Example TextAnim with texture
Posted: February 4th, 2010 | Author: guindexHey!
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 |
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
This is awesome. Thank you!
OMG! awesome TxEff free alternative, tks!
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
Hi TJ,
Thank you, and sure! You can use on every project you have with no restriction.
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,