# AS3 XML slideshow not able to loop through xml

**URL:** <https://forum.kirupa.com/t/as3-xml-slideshow-not-able-to-loop-through-xml/290175>\
**Category:** flash\
**Created:** [June 10, 2009, 8:41pm UTC](https://forum.kirupa.com/t/as3-xml-slideshow-not-able-to-loop-through-xml/290175 "2009-06-10T20:41:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wuzzi2ya](https://avatars.discourse-cdn.com/v4/letter/w/e79b87/32.png) [@wuzzi2ya](https://forum.kirupa.com/u/wuzzi2ya)\
**Post date:** [June 10, 2009, 8:41pm UTC](https://forum.kirupa.com/t/as3-xml-slideshow-not-able-to-loop-through-xml/290175/1 "2009-06-10T20:41:19Z")

</div>

With the following AS3, and the following XML how do I update the xml to load in the next sequence of nodes?

Any help is better than none, so Thanks!

AS3:  
import com.flashotaku.slideshow.events.SlideshowEvent;  
import flash.utils.Timer;  
import flash.events.TimerEvent;  
stop();  
import fl.transitions.Tween;  
import fl.transitions.easing._;  
import fl.transitions.TweenEvent;  
import gs._;

var myTimer:Timer = new Timer(5000);  
var xmlLoader:URLLoader = new URLLoader();  
var xmlData:XML = new XML();  
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);  
xmlLoader.load(new URLRequest(“content.xml”));  
function LoadXML(e:Event):void {  
trace(“LoadXML”);  
xmlData = new XML(e.target.data);  
ParseContent(xmlData);  
}  
function ParseContent(contentInput:XML):void {  
trace(“ParseContent”);  
txtBox\_mc.EventHeader.htmlText = contentInput.callout.EventHeader;  
txtBox\_mc.EventDate.htmlText = contentInput.callout.EventDate;  
txtBox\_mc.EventPlace.htmlText = contentInput.callout.EventPlace;  
trace(“XML Output”);  
trace("------------------------");  
trace(contentInput);  
}

txtBox\_mc.getTix.buttonMode = true;  
txtBox\_mc.prev\_btn.buttonMode = true;  
txtBox\_mc.next\_btn.buttonMode = true;

txtBox\_mc.prev\_btn.addEventListener(MouseEvent.CLICK, Previous);  
txtBox\_mc.next\_btn.addEventListener(MouseEvent.CLICK, Next);  
mySlideshow.addEventListener(SlideshowEvent.TRANSITION\_COMPLETE, transitionCompleteHandler);  
myTimer.addEventListener(TimerEvent.TIMER, timerHandler);  
TweenLite.to(txtBox\_mc, .5, {y:190, ease:Back.easeOut});  
function transitionCompleteHandler(event:SlideshowEvent) {  
myTimer.start();  
TweenLite.to(txtBox\_mc, .4, {y:190, ease:Back.easeOut});  
}

function Next(event:MouseEvent):void {  
myTimer.stop();  
TweenLite.to(txtBox\_mc, .5, {y:290, ease:Strong.easeOut});  
mySlideshow.nextImage();  
}  
function Previous(event:MouseEvent):void {  
myTimer.stop();  
TweenLite.to(txtBox\_mc, .5, {y:290, ease:Strong.easeOut});  
mySlideshow.prevImage();  
}  
function timerHandler(event:TimerEvent) {  
myTimer.stop();  
TweenLite.to(txtBox\_mc, .5, {y:290, ease:Strong.easeOut});  
mySlideshow.nextImage();  
}  
XML:  
\<?xml version=“1.0” encoding=“UTF-8”?\>  
\<content\>  
\<callout\>  
\<EventHeader\>Another Show at the PAC\</EventHeader\>  
\<EventDate\>July 07, 2009\</EventDate\>  
\<EventPlace\>Tulsa Performing Arts Center\</EventPlace\>  
\</callout\>  
\<callout\>  
\<EventHeader\>This is the Show\</EventHeader\>  
\<EventDate\>July 07, 2009\</EventDate\>  
\<EventPlace\>Tulsa Performing Arts Center\</EventPlace\>  
\</callout\>  
\<callout\>  
\<EventHeader\>Another Show at the PAC\</EventHeader\>  
\<EventDate\>July 07, 2009\</EventDate\>  
\<EventPlace\>Tulsa Performing Arts Center\</EventPlace\>  
\</callout\>  
\<callout\>  
\<EventHeader\>This is the Show\</EventHeader\>  
\<EventDate\>July 07, 2009\</EventDate\>  
\<EventPlace\>Tulsa Performing Arts Center\</EventPlace\>  
\</callout\>  
\</content\>  
BTW the first section:  
\<callout\>  
\<EventHeader\>Another Show at the PAC\</EventHeader\>  
\<EventDate\>July 07, 2009\</EventDate\>  
\<EventPlace\>Tulsa Performing Arts Center\</EventPlace\>  
\</callout\>…is loaded with no problem but what I need is when:  
function timerHandler(event:TimerEvent) {  
myTimer.stop();  
TweenLite.to(txtBox\_mc, .5, {y:290, ease:Strong.easeOut});  
mySlideshow.nextImage();  
}…I need the next xml:  
\<callout\>  
\<EventHeader\>This is the Show\</EventHeader\>  
\<EventDate\>July 07, 2009\</EventDate\>  
\<EventPlace\>Tulsa Performing Arts Center\</EventPlace\>  
\</callout\>… to display in the same text boxes…

Thanks!
