hi all,
been testing a very basic rss feed in flex (from adobe's cookbook beta).
see code below.
the weird thing is, it doesn't throw an error, but just doesn't show anything when launched?!? any ides?
the compiler argument is set to "-locale en_US -use-network=true" ... not sure if this is how it's supposed to be for this kind of app though ... thanks for any tip in the right direction guys!
ActionScript Code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
backgroundColor="#000000"
applicationComplete="rssFeeder.send();">
<mx:HTTPService id="rssFeeder"
url="http://rabbitpot.wordpress.com/?feed=rss2"
result="rHandler(event)">
</mx:HTTPService>
<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
[Bindable]
private var rArray:ArrayCollection;
private function rHandler(event:ResultEvent):void
{
rArray = event.result.channel.item as ArrayCollection;
}
private function eHandler(event:FaultEvent):void
{
Alert.show(event.message.toString(), "Couldn't feed");
}
]]>
</mx:Script>
<mx:DataGrid x="0" y="10" width="100%" height="200" dataProvider="{rArray}">
<mx:columns>
<mx:DataGridColumn headerText="Title" dataField="title"/>
<mx:DataGridColumn headerText="Date" dataField="date"/>
<mx:DataGridColumn headerText="Description" dataField="description"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>
thanks!