The Burned Out Hippy - Hugging Flash into Submission

Updated: FindURL (v1.1)

The FindURL class has been updated and the new version can be found here.

This new version corrects a rather embarrassing issue – the class was returning no text at all if no URL was present in the text. I was so wrapped up with trying to get it to look for URLs in a text block, it didn’t cross my mind to test it without any at all! Problem solved now though, simply overwrite the previous version and everything should work as before.

The FindURL class (v1.0)

posted by The Hippy in Actionscript 3, Classes, Downloads

Whilst I was playing around with the Twitter API I was beginning to get wound up by the fact that the XML feed from Twitter only sends out text versions of tweets and not HTML versions. For example, lets say a tweet says “Check out this cool link: http://www.plagro.com”, the xml feed from twitter would send out:

Check out this cool link: http://www.plagro.com"

as oppose to the html version containing the “a” link tag:

Check out this cool link: <a href="http://www.plagro.com">http://www.plagro.com</a>

So after trawling the forums looking for alternative feeds and/or HTML convertors, I came to the conclusion that it would be easier to write a small class that simply finds links within blocks of text and adds in the html tags so it can be displayed as HTML text. The result is the FindURL class.

More

Recent Posts
Recent Comments
About Us
The Hippy: Hi Andi Many thanks for your comment. I am indeed working on a Twitter event class. ...
Andi: Hi, first of all your class is very useful but there is one problem with your class....
Patrick Rushton: See you there! I have a spare ticket going extra cheap if any of your readers woul...
Justin Wanstall: I really quick and easy way to apply this to all external links is with a bit of jque...

This site is the playground of the The Burned Out Hippy, head honcho of the web design and multimedia company Plagro. It serves no other purpose than to act as a place where I can store my most recent Flash ActionScript experiments. However, I will be posting code whenever an experiment is complete so that you can have a play with it yourselves.

Read more about The Burned Out Hippy...