TweetParser updated to include usernames and hashtags

December 21st, 2009

Well the title says it all, the tweet parser I created and mentioned in an earlier post has been updated to include @usernames and also #hashtags. The parser will format these tags into html formatted links ready to be included in your htmlText for your AS3 text fields.

Updated source files here

Categories: Actionscript 3.0 | Tags: , , | No Comments

Tweet parser to format urls in your text fields

November 30th, 2009

A while back I created a tutorial on Active.tutsplus.com on how to create a twitter widget for your website. This tutorial has resulted in a lot of emails and great comments from people who have viewed it.....mostly good thankfully and a lot for help and advice on how to manipualte tweets etc. A few recently were about formatting the links in tweets to be clickable in a normal text field in flash. This is incredibally simple if you know how and so I have created a simple class which would parse your tweet, format the url into a 'href' tag and assign your chosen colour to the link. Then once added to a text field as htmlText would function the same as a clickable link on any web page.

The class is available here and all you need to do is include it in your source files and as the method is a public static function you do not need to instantiate it you just make reference to it like so:

Actionscript:
  1. myTwitterWidgetTextField.htmlText = TwitParser.parseTwit(pulledInTweet, 0x00FF00);

The two parameters needed are the text to be parsed and a hex value for the color of the link text...and thats it!

Happy tweeting!

Categories: Actionscript 3.0 | Tags: , | 1 Comment