Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Loading RSS feed with a title and image

New Here ,
May 30, 2013 May 30, 2013

This is My code to load and display the discription in output window :

var bbcRSS:URLLoader = new URLLoader;

bbcRSS.load( new URLRequest ("http://feeds.bbci.co.uk/news/rss.xml") );

bbcRSS.addEventListener(Event.COMPLETE, handleComplete);

function handleComplete ( e:Event ):void

{

          var rawXML:XML = new XML (bbcRSS.data);

          trace (rawXML.channel.description);

 

}

This is the XML code :

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

<?xml-stylesheet title="XSL_formatting" type="text/xsl" href="/shared/bsp/xsl/rss/nolsol.xsl"?>

<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> 

  <channel>

    <title>BBC News - Home</title> 

    <link>http://www.bbc.co.uk/news/#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> 

    <description>The latest stories from the Home section of the BBC News web site.</description> 

    <language>en-gb</language> 

    <lastBuildDate>Mon, 20 May 2013 17:36:41 GMT</lastBuildDate> 

    <copyright>Copyright: (C) British Broadcasting Corporation, see http://news.bbc.co.uk/2/hi/help/rss/4498287.stm for terms and conditions of reuse.</copyright> 

    <image>

      <url>http://news.bbcimg.co.uk/nol/shared/img/bbc_news_120x60.gif</url> 

      <title>BBC News - Home</title> 

      <link>http://www.bbc.co.uk/news/#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> 

      <width>120</width> 

      <height>60</height>

    </image> 

    <ttl>15</ttl> 

    <atom:link href="http://feeds.bbci.co.uk/news/rss.xml" rel="self" type="application/rss+xml"/> 

    <item>

      <title>Dozens die in Iraqi car bomb attacks</title> 

      <description>More than 60 people are killed and many more wounded by car bombs in the Iraqi cities of Baghdad, Basra and Samarra, police and medical officials say.</description> 

      <link>http://www.bbc.co.uk/news/world-middle-east-22593345#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> 

      <guid isPermaLink="false">http://www.bbc.co.uk/news/world-middle-east-22593345</guid> 

      <pubDate>Mon, 20 May 2013 15:55:57 GMT</pubDate> 

      <media:thumbnail width="66" height="49" url="http://news.bbcimg.co.uk/media/images/67708000/jpg/_67708799_67708681.jpg"/> 

      <media:thumbnail width="144" height="81" url="http://news.bbcimg.co.uk/media/images/67708000/jpg/_67708800_67708681.jpg"/>

    </item> 

    <item>

      <title>Kirk votes to allow gay ministers</title> 

      <description>The Church of Scotland's ruling General Assembly has voted to allow actively gay men and women to become ministers.</description> 

      <link>http://www.bbc.co.uk/news/uk-scotland-22580322#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa</link> 

      <guid isPermaLink="false">http://www.bbc.co.uk/news/uk-scotland-22580322</guid> 

      <pubDate>Mon, 20 May 2013 17:07:25 GMT</pubDate> 

      <media:thumbnail width="66" height="49" url="http://news.bbcimg.co.uk/media/images/67716000/jpg/_67716091_hi018058166.jpg"/> 

      <media:thumbnail width="144" height="81" url="http://news.bbcimg.co.uk/media/images/67716000/jpg/_67716092_hi018058166.jpg"/>

    </item>

I have two UILoaders on my stage with the instance name of "rssImageHolder1 and rssImageHolder2" for the images, and text fields with the instance name of "title1_txt and title2_txt" to show the titles from the item tag which is in RSS.

Can some one help Me how can I display this data please. Thanks alot

TOPICS
ActionScript
844
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2013 May 30, 2013

Can someone post your suggestions please

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 30, 2013 May 30, 2013
LATEST

What are you having a problem with?  You say you have the UILoaders and textfields for displaying the information, so what issue are you having with making it happen?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines