Posted By

visualadvance on 04/28/09


Tagged

rss feed actionscript atom 3 as3


Versions (?)

Who likes this?

6 people have marked this snippet as a favorite

enajenkins
solo1artist
TrentSkunk
davidino1978
tspitzr
dubogii


AS3: Simple RSS2/Atom Reader


 / Published in: ActionScript 3
 

You will need the as3 syndication library classes which can be found here: http://code.google.com/p/as3syndicationlib/

  1. // feed reader
  2. import com.adobe.xml.syndication.generic.FeedFactory;
  3. import com.adobe.xml.syndication.generic.IFeed;
  4. import com.adobe.xml.syndication.generic.IItem;
  5.  
  6. var blog:XML;
  7. var blog_url:URLRequest = new URLRequest("http://visualadvance.com/blog/wp-rss.php");
  8. var blogLoader:URLLoader = new URLLoader(blog_url);
  9. blogLoader.addEventListener (Event.COMPLETE, blogLoaded);
  10.  
  11. function blogLoaded (e:Event):void
  12. {
  13. blog = XML(blogLoader.data);
  14. trace (blog.channel.item[0].title);
  15. }

Report this snippet  

You need to login to post a comment.