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

Loading XML in AS3...trying to make a news reader

Guest
Oct 21, 2009 Oct 21, 2009

Hello! I'm hoping someone can point me in the direction of a tutorial that shows how to create a "News Widget" from an XML file. I'm a designer so I know very little code...any help would really be appreciated!

I would like to create a Flash file using AS3 that pulls info from three different nodes in an XML file. The pic below is a screen shot of what I'm trying to accomplish.

xmlExample.jpg

Here's an example of my XML:

<?xml version="1.0"?>
<rss version="2.0">
<channel><title>kstp.com - MORE NEWS</title>
<item>
<title>State announces details of Minnesota FluLine </title>
<description><![CDATA[<img alt="" src="http://kstp.com/kstpImages/health_minnesota90.jpg" align="left" border="1" />The Minnesota Health Department will soon become the latest state to announce details of a toll-free nurse line for those... ]]></description>
<link>http://kstp.com/news/stories/s1202318.shtml?cat=1</link>
<subject/>
<creator>kstp.com</creator>
<pubDate>Wed, 21 Oct 2009 11:38:04 GMT</pubDate>
</item>
<item>
<title>Environmental group to look at MN water pollution </title>
<description><![CDATA[<img alt="" src="http://kstp.com/kstpImages/water_graphic.jpg" align="left" border="1" />An environmental group releases an analysis of industrial pollution in Minnesota's waters on Wednesday. <font size="2">Environment Minnesota says...</font>]]></description>
<link>http://kstp.com/news/stories/s1202345.shtml?cat=1</link>
<subject/>
<creator>kstp.com</creator>
<pubDate>Wed, 21 Oct 2009 10:13:46 GMT</pubDate>
</item>

</channel>
</rss>

For each row I would like to display the <title> info, <description> info and wrap all of that up in the <link> URL.

I imaging there is a good tutorial out there but I don't know enough to search using the correct terms.

Any help would be AWESOME!!

Thank you!

Melissa

TOPICS
ActionScript
799
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 ,
Oct 21, 2009 Oct 21, 2009

Here's a link to a tutorial that will probably be helpful as far as getting the data collected into Flash for what you have planned.  You will need to figure out some other things in order to present the data the way you described.

AS3 - RSS XML feed
------------------

http://www.gotoandlearn.com/play?id=64

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
Guest
Oct 21, 2009 Oct 21, 2009

Thanks for the response Ned! I have seen that tutorial and it is helpful for setting up a list box, what I need an example of is how to in a list display more than one nodes worth of information...

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 ,
Oct 21, 2009 Oct 21, 2009
LATEST

You're probably not going to find too much in the way of a tutorial that arranges the content exactly the way you want it laid out.  I'm not sure what you mean when you say you want an example of how to display more than one node's worth of information.  From what I remember that tutorial has several entries, each having a few pieces of information.

Because some of your data appears to be html formatted, it may make it a little harder for you to control the layout.  You will probably have to go with some movieclip/textfield(s) combination in order to be able to format things the way you showed, possibly making use of the textfield's htmlText property.

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