  | | | Reading and displaying RSS feeds in Flash MX | Reading and displaying RSS feeds in Flash MX 2004-03-10 - By Jesse Warden
Back I'm sick, hopefully someone else can explain.
<?xml version="1.0" encoding="iso-8859 (See http://iso-8859.ora-code.com)-1" ?> /* - <!-- generator="Movable Type/2.64" --> <rss version="0.91"> <channel> <title> </title> <link> </link> <description> </description> <language> </language> <pubDate> </pubDate> <image> <title> </title> <url> </url> <link> </link> <width></width> <height></height> </image> <item> <title> </title> <link> </link> <description> </description> </item> </channel> </rss> */
my_xml = new XML(); my_xml.owner = this; my_xml.onLoad = function(success){ this.owner.news_array = []; var channels = this.firstChild.childNodes; var howMany = channels.length; for(var i=0; i<howMany; i++){ var node = channels[i].childNodes; var o = {}; o.title = node[0].firstChild; o.link = node[1].firstChild; o.description = node[2].firstChild; o.language = node[3].firstChild; o.pubDate = node[4].firstChild; var imageNode = node[5].childNodes; o.image = {}; o.image.title = imageNode[0].firstChild; o.image.url = imageNode[1].firstChild; o.image.link = imageNode[2].firstChild; o.image.width = imageNode[3].firstChild; var itemNode = node[6]; o.item = {}; o.item.title = itemNode[0].firstChild; o.item.link = itemNode[1].firstChild; o.item.description = itemNode[2].firstChild; this.owner.news_array.push(o); } this.owner.display(); }; // won't work, sit is down, hehe my_xml.load("http://www.jessewarden.com/index.rdf"); function display(){ var s = ""; var i = news_array.length; while(i--){ var item = news_array[i]; s += "Title: " + item.title + newline; s += item.description + newline; // obviously, you can add all of the // other properties of the item in here } news_txt.text = s; }
-- --Original Message-- -- From: BRYAN MASON [mailto:BMASON@(protected)] Sent: Wednesday, March 10, 2004 09:29 AM To: flashnewbie@(protected) Subject: [Flashnewbie] Reading and displaying RSS feeds in Flash MX
Hello everyone. I know that the subject of RSS has come up before, but I need to ask this question anyway.
What I want to do is to build a Flash MX app that will grab an XML RSS feed from a website and display these news items on my website. I am definitely a Actionscript newbie, so any help and hand-holding is much appreciated. Here is the XML structure:
<?xml version="1.0" encoding="iso-8859 (See http://iso-8859.ora-code.com)-1" ?> - <!-- generator="Movable Type/2.64" --> - <rss version="0.91"> - <channel> <title> </title> <link> </link> <description> </description> <language> </language> <pubDate> </pubDate> - <image> <title> </title> <url> </url> <link> </link> <width></width> <height></height> </image> - <item> <title> </title> <link> </link> <description> </description> </item> </channel> </rss>
Thanks in advance for your assitance.
Bryan
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Supported by Fig Leaf Software -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ Lower Prices for Certified Training! Check out new lower prices for Certified Macromedia Training from Fig Leaf Software. Expand your skill set with courses in ColdFusion, Flash, Rich Internet Applications and .NET in the new year. Fig Leaf Software provides the highest caliber instruction at our training centers in Washington D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location.
Get the details at http://training.figleaf.com/ -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- -- To unsubscribe, e-mail: flashnewbie-unsubscribe@(protected) For additional commands, e-mail: flashnewbie-help@(protected)
|
|
 |