Posted By

dx0ne on 02/22/09


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

loric
donaldleegraham
tspitzr


AS3: XML load


 / Published in: ActionScript 3
 

  1. import flash.net.URLLoader;
  2. import flash.net.URLRequest;
  3. import flash.xml.*;
  4.  
  5. var feedXMLloader : URLLoader;
  6. var feedXML : XML;
  7.  
  8. feedXMLloader = new URLLoader ();
  9. feedXMLloader.addEventListener (Event.COMPLETE, feedXMLisHere);
  10. feedXMLloader.load (new URLRequest (urlToPhotos));
  11.  
  12. function feedXMLisHere (e : Event) : void
  13. {
  14. feedXML = new XML (e.target.data);
  15. //feedXML.photos.photo[0].@id
  16. var list : XMLList = new XMLList (feedXML.photos.photo);
  17. for (var a in lista)
  18. {
  19. list[a].@id
  20. }
  21. };

Report this snippet  

You need to login to post a comment.