Let's apply RSS application to Flex.
<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="feedRequest.send ()"
layout="absolute">
Common mxml entrance
<mx:HTTPService
id="feedRequest"
url="http://news.bbc.co.uk/rss
useProxy="false" />
BBC News RSS url and other options
<mx:Panel x="10" y="10"
width="475" height="400"
title="{feedRequest.lastResult.rss
Title of RSS Feed
<mx:DataGrid
id="dgPosts" x="20" y="20" width="400"
dataProvider="{feedRequest.lastResult.rss
<mx:columns>
<mx:DataGridColumn headerText="Posts"
dataField="title"/>
<mx:DataGridColumn headerText="Date" dataField="pubDate"
width="150" />
</mx:columns>
</mx:DataGrid>
List RSS feed items
<mx:LinkButton x="20"
y="225" label="Read Full Post" click="navigateToURL(new
URLRequest( dgPosts.selectedItem.link));"/>
Link selected item to the button
<mx:Text
htmlText="{dgPosts.selectedItem.descriptio
y="275" width="400"/>
A little description of the selected item with htmlText
</mx:Panel>
</mx:Application>
I will publish detailed Flex tutorials asap if i have enough time.
No comments:
Post a Comment