rendered paste body<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="0x000000"
width="100%"
height="163"
initialize="requestStream()"
horizontalScrollPolicy="off"
verticalScrollPolicy="off"
paddingTop="0"
paddingBottom="0"
>
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
[Bindable]
private var twitterFeed:ArrayCollection;
private function requestStream():void {
trace("requesting Stream");
twitterService.cancel();
var params:Object = new Object();
twitterService.send();
}
private function streamHandler(event:ResultEvent):void {
twitterFeed = event.result.feed.entry as ArrayCollection;
twitterSingle.text = event.result.feed.entry[0].title;
}
private function twittHandler(event:Event):void {
trace("You clicked on the label");
}
]]>
</mx:Script>
<mx:HTTPService id="twitterService" url="http://twitter.com/statuses/user_timeline/2677771.atom" result="streamHandler(event)" />
<mx:Label text="Label" width="206" height="149" color="#F9FCFD" id="twitterSingle" click="twittHandler(event)" />
</mx:Application>