Skip to content

Instantly share code, notes, and snippets.

@mtabini
Created November 5, 2010 15:38
Show Gist options
  • Save mtabini/664298 to your computer and use it in GitHub Desktop.
Save mtabini/664298 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:feeds="services.feeds.*" addedToStage="getFeed()">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
protected function getFeed():void
{
getFeedResult.token = feed.getFeed();
}
]]>
</fx:Script>
<fx:Declarations>
<s:CallResponder id="getFeedResult"/>
<feeds:Feed id="feed" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true"/>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<mx:List width="100%" height="100%" dataProvider="{getFeedResult.lastResult.channel.item}" itemRenderer="FeedItemRenderer" />
</s:WindowedApplication>
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" height="100%" paddingLeft="10" paddingRight="10" doubleClickEnabled="true" doubleClick="navigateToURL(new URLRequest(data.link))">
<fx:Script>
<![CDATA[
import flash.net.navigateToURL;
]]>
</fx:Script>
<s:Label fontSize="14" fontWeight="bold" text="{data.title}"/>
<mx:Text width="100%" height="70" htmlText="{data.description}" />
<s:HGroup width="100%">
<s:Label fontSize="10" color="0x999999" text="{data.pubDate}" />
<mx:Spacer width="100%" />
<s:Label fontSize="10" color="0x999999" text="{data.dc_creator}" />
</s:HGroup>
</mx:VBox>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment