Assynchronous Event


<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml&#8221;
width=”500″ height=”500″>
<mx:HTTPService
id=”twitterService”
url=”http://twitter.com/statuses/public_timeline.xml&#8221;
resultFormat=”e4x”
result=”twitterServiceResultHandler(event);”
/>
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
private function twitterServiceResultHandler(event:ResultEvent):void
{
resultTxt.text = event.result.toString();
}
]]>
</mx:Script>
<mx:Button id=”myButton” label=”Send HTTP Request”
click=”twitterService.send()”/>
<mx:TextArea id=”resultTxt” width=”100%” height=”100%”/>
</mx:Application>

~ by mjcprasad2000 on January 27, 2009.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: