Tuesday, August 21, 2007

How to Do an RSS Reader with Adobe Flex

This tutorial is about developing an RSS Feeder experience by using Adobe Flex. You may dig out detailed information if learning Adobe Flex is desired by you.


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
/newsonline_uk_edition/front_page/rss.xml"

useProxy="false" />


BBC News RSS url and other options

<mx:Panel x="10" y="10"
width="475" height="400"
title="{feedRequest.lastResult.rss
.channel.title}">

Title of RSS Feed

<mx:DataGrid
id="dgPosts" x="20" y="20" width="400"
dataProvider="{feedRequest.lastResult.rss
.channel.item}">

<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
n}" x="20"
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: