Ultrashock Forums > Flash > Flex
RSS feed not showing

You are currently viewing our website as a guest which gives you limited access to forums, files and other resources.

Click here to join now for free, and start interacting with our members, download files and much more!

Click here if you are looking for our Flash files and other professional assets.
 
Post Reply | View first unread | Rate Thread Search this Thread | Thread Tools | Display Modes

#1
Bookmark and Share!
RSS feed not showing
Old 2008-10-04

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:
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
  3.     backgroundColor="#000000"
  4.     applicationComplete="rssFeeder.send();">
  5.    
  6.     <mx:HTTPService id="rssFeeder"
  7.         url="http://rabbitpot.wordpress.com/?feed=rss2"
  8.         result="rHandler(event)">
  9.     </mx:HTTPService>
  10.    
  11.     <mx:Script>
  12.         <![CDATA[
  13.            
  14.             import mx.rpc.events.FaultEvent;
  15.             import mx.collections.ArrayCollection;
  16.             import mx.rpc.events.ResultEvent;
  17.             import mx.controls.Alert;
  18.            
  19.             [Bindable]
  20.             private var rArray:ArrayCollection;
  21.            
  22.             private function rHandler(event:ResultEvent):void
  23.             {
  24.                 rArray = event.result.channel.item as ArrayCollection;
  25.             }
  26.            
  27.             private function eHandler(event:FaultEvent):void
  28.             {
  29.                 Alert.show(event.message.toString(), "Couldn't feed");
  30.             }
  31.            
  32.         ]]>
  33.     </mx:Script>
  34.    
  35.     <mx:DataGrid x="0" y="10" width="100%" height="200" dataProvider="{rArray}">
  36.         <mx:columns>
  37.             <mx:DataGridColumn headerText="Title" dataField="title"/>
  38.             <mx:DataGridColumn headerText="Date" dataField="date"/>
  39.             <mx:DataGridColumn headerText="Description" dataField="description"/>
  40.         </mx:columns>
  41.     </mx:DataGrid>
  42.    
  43. </mx:Application>

thanks!
postbit arrow Be the first to comment! | 536 views postbit arrow Reply: with Quote   
Registered User
pixum is offline
seperator
Posts: 57
2008-07-18
pixum lives in Netherlands
pixum's Avatar
seperator
Thread Tools
Display Modes Rate This Thread
Rate This Thread: