package com.swfjunkie.tweetr.events { import flash.events.Event; /** * Tweeter Event Class * @author Sandro Ducceschi [swfjunkie.com, Switzerland] */ public class TweetEvent extends Event { //-------------------------------------------------------------------------- // // Class variables // //-------------------------------------------------------------------------- /** *

The event returns the following properties:

* * * *
PropertyValue
responseArrayArray filled with Data Objects containing the results of your request
* * @eventType complete */ public static const COMPLETE:String = "complete"; /** *

The event returns the following properties:

* * * *
PropertyValue
infoContains the Error Message returned
* * @eventType failed */ public static const FAILED:String = "failed"; /** *

The event returns the following properties:

* * * *
PropertyValue
infoContains the HTTP Status
* * @eventType status */ public static const STATUS:String = "status"; //-------------------------------------------------------------------------- // // Initialization // //-------------------------------------------------------------------------- /** * Creates a TweetEvent object to pass as a parameter to event listeners. * @param type The type of the event, accessible as TweetEvent.type. * @param bubbles Determines whether the Event object participates in the bubbling stage of the event flow. The default value is false. * @param cancelable Determines whether the Event object can be canceled. The default values is false. * @param responseArray An Array filled with Data Object returned after a succesful twitter request. * @param info A Text Message containing information when a request fails or the status of your http request. * @param data The Received unparsed Data (mostly xml) */ public function TweetEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, responseArray:Array = null, info:String = null, data:Object = null) { super(type, bubbles, cancelable); this.responseArray = responseArray; this.info = info; this.data = data; } //-------------------------------------------------------------------------- // // Properties // //-------------------------------------------------------------------------- /** An Array filled with Data Object returned after a succesful twitter request */ public var responseArray:Array; /** A Text Message containing information when a request fails or the status of your http request */ public var info:String; /** The unparsed, untouched received data from twitter */ public var data:Object; //-------------------------------------------------------------------------- // // Methods // //-------------------------------------------------------------------------- /** @private */ override public function toString():String { return "[Event type=\""+type+"\"]"; } } }