Packagecom.swfjunkie.tweetr.utils
Classpublic class URLShortener
InheritanceURLShortener Inheritance flash.events.EventDispatcher

URL Shortener Class using http://is.gd/ public service



Public Properties
 PropertyDefined by
  url : String
[read-only] The Shortened URL
URLShortener
Public Methods
 MethodDefined by
  
Creates a new URLShortener Instance
URLShortener
  
destroy():void
Completely destroys the instance and frees all objects for the garbage collector by setting their references to null.
URLShortener
  
shorten(url:String):void
Shortens the given URL
URLShortener
Events
 EventSummaryDefined by
   Dispatched when the instance has successfully shortened an url.URLShortener
   Dispatched when the instance has encountered an error while trying to encode your url.URLShortener
Property detail
urlproperty
url:String  [read-only]

The Shortened URL

Implementation
    public function get url():String
Constructor detail
URLShortener()constructor
public function URLShortener()

Creates a new URLShortener Instance

Method detail
destroy()method
public function destroy():void

Completely destroys the instance and frees all objects for the garbage collector by setting their references to null.

shorten()method 
public function shorten(url:String):void

Shortens the given URL

Parameters
url:String — Long URL that should be shortened
Event detail
completeevent 
Event object type: flash.events.Event

Dispatched when the instance has successfully shortened an url.

ioErrorevent  
Event object type: flash.events.IOErrorEvent

Dispatched when the instance has encountered an error while trying to encode your url.





comments powered by Disqus