# AS 2/FL4 newbie: display multiples lines of text thru XML

**URL:** <https://forum.kirupa.com/t/as-2-fl4-newbie-display-multiples-lines-of-text-thru-xml/291458>\
**Category:** flash\
**Created:** [June 30, 2009, 3:32am UTC](https://forum.kirupa.com/t/as-2-fl4-newbie-display-multiples-lines-of-text-thru-xml/291458 "2009-06-30T03:32:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aortic001](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@aortic001](https://forum.kirupa.com/u/aortic001)\
**Post date:** [June 30, 2009, 3:32am UTC](https://forum.kirupa.com/t/as-2-fl4-newbie-display-multiples-lines-of-text-thru-xml/291458/1 "2009-06-30T03:32:42Z")

</div>

Hi all, I’ve been trying to set up this I thought simple photo transition…This is all new to me so please excuse me if I used the wrong terminologies 🙂

Basically, I’m setting up this animation of photo transitions. Each “set” consists of a photo and two lines of text on top of it, and so forth…I based it on this tutorial [http://www.kirupa.com/developer/mx2004/xml\_slideshow.htm](http://www.kirupa.com/developer/mx2004/xml_slideshow.htm), and most of it works, but stumbling on how to show the two separate lines of text…I’m guessing I need another array for the 2nd line of text after “description\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;” (please see below) ?

[COLOR=Black]function[/COLOR][COLOR=Black] loadXML(loaded)[/COLOR][COLOR=Black] {[/COLOR][COLOR=Black] [/COLOR][COLOR=Black]if[/COLOR][COLOR=Black] (loaded)[/COLOR][COLOR=Black] {[/COLOR][COLOR=Black] [/COLOR][COLOR=Black]xmlNode = this.firstChild; [/COLOR][COLOR=Black]image = []; [/COLOR][COLOR=Black]description = []; [/COLOR][COLOR=Black]total = xmlNode.childNodes.length; [/COLOR][COLOR=Black]for (i=0; i\<total; i++) {[/COLOR] [COLOR=Black]image\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue; [/COLOR][COLOR=Red]description\* =xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;[/COLOR] [COLOR=Black]}[/COLOR] [COLOR=Black]firstImage();[/COLOR][COLOR=Black]}[/COLOR][COLOR=Black] else[/COLOR][COLOR=Black] {[/COLOR][COLOR=Black] [/COLOR][COLOR=Black] content[/COLOR][COLOR=Black] =[/COLOR] [COLOR=Black] “file not loaded!”[/COLOR][COLOR=Black];[/COLOR][COLOR=Black]}[/COLOR][COLOR=Black]}[/COLOR]  
And how should I write out the node in the xml file? Currently:  
\<pic\>  
\<image\>images/image1.jpg\</image\>  
\<caption\>Text1\</caption\>  
\</pic\>
