This library allows you to programmatically create TinyURLs in your Flex or Flash application. It contains exactly one class with exactly one static function:

TinyURL.create (url : String, callback : Function) : void

The premise is simple – pass in a URL, and get back a TinyURL in your callback method. Callback methods have the following signature:

function callback (tinyURL : String) : void

I toyed around with having the create() method return the TinyURL directly, but that didn’t work out very well given the fact it’s an asynchronous operation.

Still, I’m happy with how it turned out. I wrote this library mostly because I wanted to see if I could, and I thought it would be cool. And I did. (and it is) 🙂

Click here to view the application demo (source included)

Click here to download TinyURL Flex Library