16 Replies Latest reply on Sep 30, 2011 6:58 PM by advacomp

    New To Flex: RSS Reader Help

    MichaelBAH Level 1

      I am trying to do an oh so very simple RSS reader in flex but I keep  seeing so many ways to do it and none of them are working for me, from  what I understand it should be as simple as:

      <mx:HTTPService id="EngadgetFeed"  url="http://www.engadget.com/rss.xml" />

      but then how do I bind the data to my data grid?

      <mx:DataGrid  id="Feed" x="10" y="86" height="307">
      <mx:columns>
      <mx:DataGridColumn headerText="Title" dataField="col1"/>
      <mx:DataGridColumn headerText="Date" dataField="col2"/>
      </mx:columns>
      </mx:DataGrid>

      ive tried adding : dataProvider = "{EngadgetFeed}" but I know im still  missing something.

      Can someone show me how to do it in the most simplest way? I dont need  it to be amazing looking I just want it to function so I can learn how  to do it.

        • 1. Re: New To Flex: RSS Reader Help
          archemedia Level 4

          This should help you get going:

           

          <?xml version="1.0" encoding="utf-8"?>
          <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()">
             
              <mx:HTTPService id="myService"
                  url="http://www.engadget.com/rss.xml" fault="handleFault(event)" result="handleResult(event)"/>
             
              <mx:Script>
                  <![CDATA[
                      import mx.collections.ArrayCollection;
                      import mx.rpc.events.FaultEvent;
                      import mx.rpc.events.ResultEvent;
                     
                      [Bindable]
                      private var rssObject:Object;
                     
                      private var dp:ArrayCollection = new ArrayCollection();
                     
                      private function init():void
                      {
                          myService.send();
                      }
                     
                      private function handleResult(evt:ResultEvent):void
                      {
                          rssObject = evt.result.rss.channel;
                      }
                     
                      private function handleFault(evt:FaultEvent):void
                      {
                         
                      }
                  ]]>
              </mx:Script>
              <mx:Label text="{rssObject.title}" fontSize="18" fontWeight="bold"/>
              <mx:Image source="{rssObject.image.url}"/>
              <mx:DataGrid dataProvider="{rssObject.item}" variableRowHeight="true">
                  <mx:columns>
                      <mx:DataGridColumn headerText="Column 1" dataField="title" width="300" wordWrap="true"/>
                  </mx:columns>
              </mx:DataGrid>
             
             
          </mx:Application>

           

           

          Dany

          • 2. Re: New To Flex: RSS Reader Help
            MichaelBAH Level 1

            Thank you! That seems to be working although im still not getting any data displayed in my datagrid however I am now not getting any weird errors like I was before.

             

            So here is where I am at, this is my code for my grid as well as a picture of my layout so you can see what I am trying to accomplish:

             

            <mx:Panel x="10" y="10" width="720" height="449" layout="absolute" resizeEffect="Resize">
                <mx:DataGrid  id="Feed" x="10" y="86" height="307" dataProvider="{rssObject.item}">
                        <mx:columns>
                            <mx:DataGridColumn headerText="Title" dataField="col1"/>
                            <mx:DataGridColumn headerText="Date" dataField="col2"/>
                        </mx:columns>
                    </mx:DataGrid>
                <mx:TextArea x="220" y="88" width="470" height="305"/>
                <mx:Button x="10" y="25" label="Engadget" width="202" height="53" click="{EngadgetFeed.send();}"/>
                <mx:Button x="220" y="25" label="Gizmodo" width="202" height="53" click="{GizmodoFeed.send();}"/>
            </mx:Panel>

             

            So you can see I have a panel and then a datagrid, some buttons and text area. Here is a photo of my layout:

            Untitled.png

             

            Its a little hard to see but I have my buttons on top and the datagrid on the left hand side. I want it to display the title of stories on the side and then when the user clicks a story the actual rss post shows up on the right side in the text box.

             

            So my question now is how do I map the data to the data grid and consequently the text area? I thought I had it but everything I keep trying doesnt really seem to work out.

             

            Thanks!

            • 3. Re: New To Flex: RSS Reader Help
              archemedia Level 4

                  <mx:Button x="10" y="25" label="Engadget" width="202" height="53" click="{EngadgetFeed.send();}"/>
                  <mx:Button x="220" y="25" label="Gizmodo" width="202" height="53" click="{GizmodoFeed.send();}"/>

               

              What is the difference between the EngadgetFeed and the GirmodoFeed??

               

              Dany

              • 4. Re: New To Flex: RSS Reader Help
                archemedia Level 4

                I messed around a little bit with your layout but this works. I've highlighted important details:

                 

                <?xml version="1.0" encoding="utf-8"?>
                <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()">
                   
                    <mx:HTTPService id="EngadgetFeed"
                        url="http://www.engadget.com/rss.xml" fault="handleFault(event)" result="handleResult(event)"/>
                   
                    <mx:Script>
                        <![CDATA[
                            import mx.collections.ArrayCollection;
                            import mx.rpc.events.FaultEvent;
                            import mx.rpc.events.ResultEvent;
                           
                            [Bindable]
                            private var rssObject:Object;
                           
                            private var dp:ArrayCollection = new ArrayCollection();
                           
                            private function init():void
                            {
                            }
                           
                            private function handleResult(evt:ResultEvent):void
                            {
                                rssObject = evt.result.rss.channel;
                            }
                           
                            private function handleFault(evt:FaultEvent):void
                            {
                               
                            }
                           
                        ]]>
                    </mx:Script>
                    <mx:Label text="{rssObject.title}" fontSize="18" fontWeight="bold"/>
                    <mx:Image source="{rssObject.image.url}"/>
                   
                    <mx:Panel x="10" y="10" width="100%" height="100%" layout="vertical" resizeEffect="Resize">
                        <mx:Button x="10" y="25" label="Engadget" width="202" height="53" click="{EngadgetFeed.send();}"/>
                        <mx:HBox width="100%" height="100%">
                            <mx:DataGrid  id="Feed" height="307" width="202" dataProvider="{rssObject.item}">
                                <mx:columns>
                                    <mx:DataGridColumn headerText="Title" dataField="title"/>
                                    <mx:DataGridColumn headerText="Date" dataField="pubDate"/>
                                </mx:columns>
                            </mx:DataGrid>
                            <mx:TextArea width="100%" height="100%" htmlText="{Feed.selectedItem.description}"/>
                           
                        </mx:HBox>
                        <!--<mx:Button x="220" y="25" label="Gizmodo" width="202" height="53" click="{GizmodoFeed.send();}"/>-->
                    </mx:Panel>

                 


                </mx:Application>

                 

                does this answer your question?

                 

                Dany

                1 person found this helpful
                • 5. Re: New To Flex: RSS Reader Help
                  MichaelBAH Level 1

                  Thank you so much! I was wondering what the dataField in the columns did XD

                   

                  That makes it very clear for me now! Thank you!

                   

                  As for your question about the GizmodoFeed I was hoping to have the Gizmodo Rss feed open up when I hit the button and then the Engadget when I hit the engadget button. That way you could switch between the two different feeds. What would be the best way to go about this?

                   

                  Thanks!

                  Michael Bahu

                  • 6. Re: New To Flex: RSS Reader Help
                    archemedia Level 4

                    Post the details of the GuzmoFeed and I'll add it to the code.

                     

                    Please mark helpfull or answered replies as such

                     

                    Dany

                    1 person found this helpful
                    • 7. Re: New To Flex: RSS Reader Help
                      MichaelBAH Level 1

                      The only info I got on it is just like the engadget feed:

                       

                           <mx:HTTPService id="GizmodoFeed"
                               url="http://www.gizmodo.com/rss/" fault="handleFault(event)" result="handleResult(event)" />

                       

                      Thats basically all I knew how to add. I figure one of the functions needs to be changed to accept different feeds or something but im not entirely sure.

                       

                      I marked all your posts as helpful thank you!

                      • 8. Re: New To Flex: RSS Reader Help
                        archemedia Level 4

                        Your link for Gizmodo was wrong, I altered it:

                         

                        <?xml version="1.0" encoding="utf-8"?>
                        <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" creationComplete="init()">
                           
                            <mx:HTTPService id="EngadgetFeed"
                                url="http://www.engadget.com/rss.xml" fault="handleFault(event)" result="handleResult(event)"/>
                               
                            <mx:HTTPService id="GizmodoFeed"
                                 url="http://gizmodo.com/index.xml" fault="handleFault(event)" result="handleResult(event)" />
                           
                            <mx:Script>
                                <![CDATA[
                                    import mx.collections.ArrayCollection;
                                    import mx.rpc.events.FaultEvent;
                                    import mx.rpc.events.ResultEvent;
                                   
                                    [Bindable]
                                    private var rssObject:Object;
                                   
                                    private var dp:ArrayCollection = new ArrayCollection();
                                   
                                    private function init():void
                                    {
                                        //GizmodoFeed.send();
                                    }
                                   
                                    private function handleResult(evt:ResultEvent):void
                                    {
                                        rssObject = evt.result.rss.channel;
                                    }
                                   
                                   
                                    private function handleFault(evt:FaultEvent):void
                                    {
                                       
                                    }
                                   
                                ]]>
                            </mx:Script>
                            <mx:Label text="{rssObject.title}" fontSize="18" fontWeight="bold"/>
                            <mx:Image source="{rssObject.image.url}"/>
                           
                            <mx:Panel x="10" y="10" width="100%" height="100%" layout="vertical" resizeEffect="Resize">
                                <mx:Button x="10" y="25" label="Engadget" width="202" height="53" click="{EngadgetFeed.send();}"/>
                                <mx:Button x="220" y="25" label="Gizmodo" width="202" height="53" click="{GizmodoFeed.send();}"/>
                                <mx:HBox width="100%" height="100%">
                                    <mx:DataGrid  id="Feed" height="307" width="202" dataProvider="{rssObject.item}">
                                        <mx:columns>
                                            <mx:DataGridColumn headerText="Title" dataField="title"/>
                                            <mx:DataGridColumn headerText="Date" dataField="pubDate"/>
                                        </mx:columns>
                                    </mx:DataGrid>
                                    <mx:TextArea width="100%" height="100%" htmlText="{Feed.selectedItem.description}"/>
                                   
                                </mx:HBox>
                            </mx:Panel>

                         


                        </mx:Application>

                         

                         

                         

                        The datafield holds the name of the property of your dataprovider to pass to the column. It should match the name of one of your rss property names.

                         

                        Dany

                        • 9. Re: New To Flex: RSS Reader Help
                          MichaelBAH Level 1

                          Thanks so much you have been an amazing help!

                           

                          This last question is more out of curiosity than necessity, but is there a way to display the images that might be associated with a particluar article in a feed? I know that many of these rss feeds also include pictures.

                           

                          Just wondering.


                          Thanks!

                          • 10. Re: New To Flex: RSS Reader Help
                            archemedia Level 4

                            To see what you can get out of an rss feed, you simply have to analyse the rss object that's

                            coming in. Use the debugger to do that.

                             

                            This is the Gizmodo object:

                             

                            Schermafbeelding 2010-02-11 om 16.40.17.png

                             

                            As you can see, we've put evt.result.rss.channel in our rssObject.

                            Starting from there, you can see that there is an image property underneath. Within this property, there is a property called url. By inspecting this property, you see that it's pointing to a png image somewhere on the internet. Now we can use this knowlegde to bind this image url to the source property of an image:

                             

                            <mx:Image source = "{rssObject.image.url}"/>

                             

                            That's the workflow:

                             

                            - Get your result from an url.

                            - Store this result in an object

                            - Analyse the result to learn the hierarchy of it.

                             

                            Sometimes, it's a bit trial and error but once you grag the idea, it's a piece of cake.

                             

                            It's a good excercise to experiment with a few other rss feeds (or the more recent and versatile atom feeds)

                             

                            For example: try to display info of this atom feed: http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=10/xml

                             

                            Succes,

                             

                            Dany

                            • 11. Re: New To Flex: RSS Reader Help
                              MichaelBAH Level 1

                              Ok I can see now how you were finding where to point the program to look to find the information to display in XML. I get that part easy. I also get how you found where the image was embedded in the feed. My question now is I know we already made an object of the RSS can we not just do something like :

                               

                              rssObject.item.image.url;  ??

                               

                              Or something to that effect to access that information?

                               

                              I want to thank you again your answers are perfect and they are really helping me understand a lot.

                               

                              One last thing how would I go about displaying the image? I mean lets say what I said above is plausible(rssObject.item.image.url):

                               

                              <mx:TextArea x="292" y="79" width="470" height="305" htmlText="{Feed.selectedItem.description}"

                               

                              From that partial excerpt from the code we can see that I am already calling for a display of the article that is selected in the datagrid. Is there a way to nest calls? Like so that way it will also display the image?

                               

                              Thanks!

                              • 12. Re: New To Flex: RSS Reader Help
                                fresher4flex Level 1

                                Hi Danny,

                                 

                                I have an RSS requirement wher ei have to display all images in the RSS. When I am debugging i found these images are in <media:content> inside item tags.can you let me kow how to dispaly these images in my feed reader.

                                 

                                here is the RSS link I am using

                                http://rss.news.yahoo.com/rss/entertainment

                                • 13. Re: New To Flex: RSS Reader Help
                                  archemedia Level 4

                                  This should get you going:

                                   

                                   

                                  <?xml version="1.0"?>

                                   

                                  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="ws.send()">

                                   

                                      <mx:HTTPService id="ws" url="http://rss.news.yahoo.com/rss/entertainment"
                                          fault="httpService_fault(event)"
                                          result="httpService_result(event)"/> 
                                         
                                      <mx:Script>
                                          <![CDATA[
                                              import mx.collections.ArrayCollection;
                                              import mx.rpc.events.ResultEvent;
                                              import mx.rpc.events.FaultEvent;
                                             
                                              [Bindable]
                                              private var dp:ArrayCollection;

                                   

                                              private function httpService_fault(event:FaultEvent):void
                                              {
                                              }
                                             
                                              private function httpService_result(event:ResultEvent):void
                                              {
                                                  dp = event.result.rss.channel.item;
                                              }

                                   

                                          ]]>

                                   

                                      </mx:Script>
                                     
                                      <mx:DataGrid dataProvider="{dp}" variableRowHeight="true" wordWrap="true" width="100%">
                                          <mx:columns>
                                              <mx:DataGridColumn headerText="Image">
                                                  <mx:itemRenderer>
                                                      <mx:Component>
                                                          <mx:Image source="{data.content.url}"/>
                                                      </mx:Component>
                                                  </mx:itemRenderer>
                                              </mx:DataGridColumn>
                                              <mx:DataGridColumn headerText="Title" dataField="title" width="200"/>
                                          </mx:columns>
                                      </mx:DataGrid>
                                      
                                  </mx:Application>

                                   

                                   


                                  Let me know if you're having further problems

                                   

                                  Dany

                                  • 14. Re: New To Flex: RSS Reader Help
                                    fresher4flex Level 1

                                    Hi, Thank you for the quick reply. This is not working.Actually I am using the results in List, I think thats not the problem.

                                    But image url is in media contnet inside Item, so its an attribute.

                                    <media:content url="

                                    http://d.yimg.com/a/p/ap/20100413/capt.7d359f55d1284121982e6cf1e86aba28-7d359f55d128412198 2e6cf1e86aba28-0.jpg?x=110&y=130&q=85&sig=HchorDV_5Iepo03rVldXSA--" type="image/jpeg" height="130" width="110" xmlns:media="http://search.yahoo.com/mrss/" xmlns:ynews="http://news.yahoo.com/rss/"/>

                                     

                                     

                                    here my code:

                                     

                                     

                                    Main File:

                                     

                                    <?xml version="1.0" encoding="utf-8"?>

                                    <mx:Application

                                     

                                     

                                    xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="httpService.send()">

                                     

                                     

                                    <mx:Script>

                                    <![CDATA[

                                     

                                     

                                    import mx.binding.utils.BindingUtils;

                                     

                                    import mx.collections.XMLListCollection;

                                     

                                    import mx.collections.ArrayCollection;

                                     

                                    import flash.net.navigateToURL;

                                     

                                    import mx.events.ListEvent;

                                     

                                    import mx.controls.Alert;

                                     

                                    import mx.utils.ObjectUtil;

                                     

                                    import mx.rpc.events.FaultEvent;

                                     

                                    import mx.rpc.events.ResultEvent;

                                     

                                     

                                     

                                    namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";

                                     

                                    use namespace rdf;

                                     

                                    namespace purl = "http://purl.org/rss/1.0/";

                                     

                                    use namespace purl;

                                     

                                    namespace dc = "http://purl.org/dc/elements/1.1/";

                                     

                                    use namespace dc;

                                     

                                    namespace sy = "http://purl.org/rss/1.0/modules/syndication/";

                                     

                                    use namespace sy;

                                     

                                    namespace co = "http://purl.org/rss/1.0/modules/company/";

                                     

                                    use namespace co;

                                     

                                    namespace ti = "http://purl.org/rss/1.0/modules/textinput/";

                                     

                                    use namespace ti;

                                     

                                    namespace rss = "http://purl.org/rss/1.0/";

                                     

                                    use namespace rss;

                                     

                                    namespace atom = "http://www.w3.org/2005/Atom";

                                     

                                    use namespace atom;

                                     

                                    namespace xhtml = "http://www.w3.org/1999/xhtml";

                                     

                                    use namespace xhtml;

                                     

                                     

                                    [

                                     

                                    Bindable]

                                     

                                    public var rssURL:String;

                                    [

                                    Bindable]

                                     

                                    private var loading : Boolean = true;

                                    [

                                    Bindable]

                                     

                                    public var numFeeds:int;

                                    [

                                    Bindable]

                                     

                                    public var daysSelected:int = 1;

                                    [

                                    Bindable]

                                     

                                    public var myImage1:String;

                                    [

                                    Bindable]

                                     

                                    public var myDataProvider:ArrayCollection;

                                     

                                    public var rssXML:XML;

                                    [

                                    Bindable]

                                     

                                    public var myxml:XMLListCollection;

                                     

                                    public var myArr:Array=new Array();;

                                     

                                    public var myArr2:Array;

                                     

                                    public var myItems:XMLList;

                                     

                                    public var myTitle:String;

                                     

                                     

                                    [

                                    Bindable]

                                     

                                    public var itemRenderProvider:ArrayCollection =new ArrayCollection(

                                    [

                                    {label:

                                    'HeadlineOnly'},

                                    {label:

                                    'ImageOnly'},

                                    {label:

                                    'HeadLine and Summary'},

                                    {label:

                                    'HeadLine,Summary and Image'}

                                    ]);

                                     

                                     

                                     

                                    private function onChangeItemRender(event:ListEvent):void{

                                     

                                     

                                    if(event.target.selectedItem.label=="HeadlineOnly"){

                                    list.itemRenderer=

                                    new ClassFactory(HeadLineOnly);

                                    }

                                    else if(event.target.selectedItem.label=="ImageOnly"){

                                    list.itemRenderer=

                                    new ClassFactory(ImageOnlyRenderer);

                                    }

                                     

                                    }

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                     

                                    private function onResult( event : ResultEvent ) : void

                                    {

                                     

                                     

                                    var myData:XMLList=XML( event.result )..item.toString ;

                                    list.dataProvider = XML( event.result )..item ;

                                     

                                    //myImage1=myData.media.attribute;

                                     

                                     

                                    //loadLinks(myData)

                                    loading =

                                     

                                    false;

                                    }

                                     

                                     

                                     

                                     

                                     

                                    private function byHeading(myItems:XMLList):void{

                                     

                                    var forTitle:XMLList=myItems.title;

                                     

                                    var forDescription:String=myItems.description.toString();

                                     

                                    trace(forTitle);

                                     

                                    trace(forDescription);

                                    }

                                     

                                     

                                    private function onFault( event : FaultEvent ) : void

                                    {

                                    Alert.show( ObjectUtil.toString( event.fault ),

                                     

                                    "Service Error" );

                                    loading =

                                    false;

                                    }

                                     

                                    private function onItemDoubleClick( event : ListEvent ) : void

                                    {

                                     

                                     

                                    var url : String = event.itemRenderer.data.link.toString()

                                    navigateToURL(

                                    new URLRequest( url ), "_blank" );

                                    }

                                     

                                    ]]>

                                     

                                    </mx:Script>

                                     

                                     

                                     

                                    <mx:HTTPService

                                    id="

                                     

                                    httpService" fault="onFault(event)"

                                    url="

                                    http://rss.news.yahoo.com/rss/entertainment

                                     

                                    " resultFormat="

                                     

                                    e4x"

                                    result="onResult( event )"

                                    />

                                     

                                     

                                     

                                     

                                     

                                     

                                    <mx:VBox x="0" y="10" height="100%" width="100%">

                                     

                                     

                                    <mx:ApplicationControlBar width="100%" height="15%">

                                     

                                     

                                    <mx:HBox width="100%" height="100%">

                                     

                                     

                                    <mx:TextArea width="198"/>

                                     

                                     

                                    <mx:ComboBox id="itemRenderChooser" dataProvider="{itemRenderProvider}"

                                    change="onChangeItemRender(event)"

                                    >

                                     

                                     

                                    </mx:ComboBox>

                                     

                                     

                                     

                                    <mx:ComboBox>

                                     

                                     

                                    <mx:dataProvider>

                                     

                                     

                                    <mx:Number> 1 </mx:Number>

                                     

                                     

                                    <mx:Number> 2 </mx:Number>

                                     

                                     

                                    <mx:Number> 3 </mx:Number>

                                     

                                     

                                    <mx:Number> 4 </mx:Number>

                                     

                                     

                                    <mx:Number> 5 </mx:Number>

                                     

                                     

                                    <mx:Number> 6 </mx:Number>

                                     

                                     

                                    </mx:dataProvider>

                                     

                                    </mx:ComboBox>

                                     

                                     

                                    <mx:ComboBox>

                                     

                                     

                                    <mx:dataProvider>

                                     

                                     

                                    <mx:Object> 24 Hours </mx:Object>

                                     

                                     

                                    <mx:Object> past 2 days </mx:Object>

                                     

                                     

                                    <mx:Object> past 3 Days </mx:Object>

                                     

                                     

                                    <mx:Object> past 4 Days </mx:Object>

                                     

                                     

                                    <mx:Object> past 5 Days </mx:Object>

                                     

                                     

                                    <mx:Object> past 6 Days </mx:Object>

                                     

                                     

                                    <mx:Object> past 7 Days </mx:Object>

                                     

                                     

                                    </mx:dataProvider>

                                     

                                     

                                    </mx:ComboBox>

                                     

                                     

                                    <mx:Button label="Button"/>

                                     

                                    </mx:HBox>

                                     

                                    </mx:ApplicationControlBar>

                                     

                                    <mx:List

                                    width="

                                    100%"

                                    height="

                                    100%"

                                    id="

                                    list" itemRenderer="HeadLineOnly"

                                    variableRowHeight="

                                    true"

                                    doubleClickEnabled="

                                    true"

                                    itemDoubleClick="onItemDoubleClick(event)"

                                    />

                                     

                                     

                                     

                                    </mx:VBox>

                                     

                                    </mx:Application>

                                     

                                     

                                     

                                     

                                    ImageOnlyRenderer:

                                     

                                     

                                    <?xml version="1.0" encoding="utf-8"?>

                                    <mx:VBox

                                     

                                    xmlns:mx="

                                    http://www.adobe.com/2006/mxml"

                                    verticalGap="

                                    0"

                                    horizontalScrollPolicy="

                                    off"

                                    verticalScrollPolicy="

                                    off">

                                     

                                     

                                    <mx:Script>

                                    <![CDATA[

                                     

                                    import mx.core.Application;

                                     

                                    import flash.utils.setTimeout;

                                     

                                    import mx.controls.List;

                                     

                                     

                                    namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";

                                     

                                    use namespace rdf;

                                     

                                    namespace purl = "http://purl.org/rss/1.0/";

                                     

                                    use namespace purl;

                                     

                                    namespace dc = "http://purl.org/dc/elements/1.1/";

                                     

                                    use namespace dc;

                                     

                                    [

                                    Bindable]

                                     

                                    private var list : List;

                                    [

                                    Bindable]

                                     

                                    public var myImage:String=Application.application.myImage1;

                                     

                                    override public function set data(value:Object):void

                                    {

                                     

                                    super.data = value;

                                    list = owner

                                    as List;

                                    }

                                    ]]>

                                     

                                    </mx:Script>

                                     

                                     

                                    <!-- <mx:Label

                                    width="100%"

                                    fontWeight="bold"

                                    fontSize="14"

                                    text="{ data.title }"

                                    selectable="false" />-->

                                     

                                    <mx:Image id="i1" source="{data.content.url}" />

                                     

                                     

                                     

                                    </mx:VBox>

                                     

                                     

                                     

                                     

                                    HeadLineOnly

                                     

                                    <?xml version="1.0" encoding="utf-8"?>

                                    <mx:VBox

                                     

                                    xmlns:mx="

                                    http://www.adobe.com/2006/mxml"

                                    verticalGap="

                                    0"

                                    horizontalScrollPolicy="

                                    off"

                                    verticalScrollPolicy="

                                    off">

                                     

                                     

                                    <mx:Script>

                                    <![CDATA[

                                     

                                    import mx.core.Application;

                                     

                                    import flash.utils.setTimeout;

                                     

                                    import mx.controls.List;

                                     

                                     

                                    namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";

                                     

                                    use namespace rdf;

                                     

                                    namespace purl = "http://purl.org/rss/1.0/";

                                     

                                    use namespace purl;

                                     

                                    namespace dc = "http://purl.org/dc/elements/1.1/";

                                     

                                    use namespace dc;

                                     

                                    namespace sy = "http://purl.org/rss/1.0/modules/syndication/";

                                     

                                    use namespace sy;

                                     

                                    namespace co = "http://purl.org/rss/1.0/modules/company/";

                                     

                                    use namespace co;

                                     

                                    namespace ti = "http://purl.org/rss/1.0/modules/textinput/";

                                     

                                    use namespace ti;

                                     

                                    namespace rss = "http://purl.org/rss/1.0/";

                                     

                                    use namespace rss;

                                     

                                    namespace atom = "http://www.w3.org/2005/Atom";

                                     

                                    use namespace atom;

                                     

                                    namespace xhtml = "http://www.w3.org/1999/xhtml";

                                     

                                    use namespace xhtml;

                                     

                                     

                                     

                                     

                                    [

                                    Bindable]

                                     

                                    private var list : List;

                                    [

                                    Bindable]

                                     

                                    override public function set data(value:Object):void

                                    {

                                     

                                    super.data = value;

                                    list = owner

                                    as List;

                                    }

                                    ]]>

                                     

                                    </mx:Script>

                                     

                                     

                                     

                                    <mx:Label

                                    width="

                                    100%"

                                    fontWeight="

                                    bold"

                                    fontSize="

                                    14"

                                    text="

                                    { data.title }"

                                    selectable="

                                    false" />

                                     

                                     

                                     

                                    </mx:VBox>

                                    • 15. Re: New To Flex: RSS Reader Help
                                      fresher4flex Level 1

                                      Also when I am using only data.description    i am getting images along with desciption..How can I avoid images that are coming with the desciption?

                                      • 16. Re: New To Flex: RSS Reader Help
                                        advacomp Level 1

                                        Any hints on how to get something like this working with Craigslist RSS feeds?

                                         

                                        Colin