Posted By

creativelifeform on 04/08/09


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

toxin20
ClayVillage


Parse XML with Line Breaks!


 / Published in: ActionScript 3
 

Its a nice lil trick ;)

  1. _xmlLoader.addEventListener(Event.COMPLETE, function(e2:Event):void {
  2. _xmlData = new XML(e2.target.data);
  3. var titleList:XMLList = _xmlData.Book.title;
  4. var titleListLength:int = titleList.length();
  5. _ecoText.text = '';
  6. for(var i=0 ; i<titleListLength ; i++){
  7. _ecoText.appendText(titleList[i]+String.fromCharCode(10,13));
  8. _ecoText.setTextFormat(_ecoFormat);
  9. }
  10.  
  11. });

Report this snippet  

You need to login to post a comment.