Add

TextAnimator AS3


keita over at labs.hellokeita.com has a great utility for animating/typing text here.

The click me link will show up in the output of flash as it is a trace statement.

import br.hellokeita.anim.TextAnimation;
 
 
TextAnimation.animate("",
	"Welcome to <font color='#FF0000'><a href='http://labs.hellokeita.com'>labs.hellokeita.com</a></font><br>"+
	"Some more text.<br><a href='event:hello world!'><font color='#FF0000'>Click Me.</font></a><br><br>"+
	"Welcome to <a href='http://blog.hydrotik.com'><font color='#990000'>blog.hydrotik.com</font></a><br>"+
	"Some more text.<br><a href='event:hello world 2!'><font color='#990000'>Click Me.</font></a>", {
	textField: tf,
	step: 5,
	time: 5,
	delay: 0,
	characters: "0123456789-#",
	transition: "easeInOutCubic"
});
 
 
var style:StyleSheet = new StyleSheet();
var a:Object = new Object();
a.color = 0xFF0000;
style.setStyle("a:hover", a);
 
tf.addEventListener("link", clickHandler);
 
 
function clickHandler(e:TextEvent):void {
  trace(e.type); // link
  trace(e.text); // myEvent
}

keita did a great job on this. I simply made a slight modification that allows for href tags as well as nested tags and corrected an import link path. I think he plans on adding support for all tags at some point.


TextAnimator Update Source

The Discussion

see what everyone is saying

  • Nicola November 13th, 2007 at 12:08 pm #1

    man, i discovered this blog only few days ago and i was shoked about the topic you talk about. is exactly what i'm looking for! every time (not exactly.. i'm not looking 4 petronas tower.. but i enjoy it!)

    very well done! keep going!

    cheers from an italian collegue (not in the flash master way but in the musical one :D )

  • djdonovan November 13th, 2007 at 1:18 pm #2

    Glad to hear:) Yeah, I decided to hide my Dad's photojourney from the main index page for that reason;)

    Keita actually deserves the accolades for this one. He did a great job on this and all of the work! :)

    You should check out his blog, he has some great stuff there.

  • keita November 15th, 2007 at 11:26 pm #3

    Hey Donovan,

    I updated my TextPattern class to accept any kind of tags not only font or anchor.
    Check it out on my repository.

    cheers,

  • djdonovan November 17th, 2007 at 10:29 pm #4

    I updated the code from your latest rev. Still getting the import error (to the jp. package) which I changed ro point ot your Equations class, I also noticed a problem with the regex on line 12 which I commented out in the TextAnimator class.

  • Albert December 19th, 2007 at 3:54 pm #5

    Does anyone one know the function that was used on http://labs.hellokeita.com/2007/09/20/textanimation/ that made the animation go backwards? (from a written word animated to nothing)

Respond

get in on the action.

* Required

  • Viagra ordre
  • Cialis en ligne
  • Levitra en ligne
  • Propecia acheter
  • Viagra acheter
  • Acheter cialis
  • Ordre levitra
  • Ordre propecia
  • En ligne viagra
  • Vente cialis
  • Levitra bon marche
  • Propecia en ligne
  • Viagra online
  • Buy cialis
  • Order Levitra
  • Buy propecia
  • Buy viagra
  • Cheap cialis
  • Cheap Levitra
  • propecia online
  • Viagra prescription
  • Cialis online
  • Buy Levitra
  • Order propecia