# XML rotating banner help ASAP please

**URL:** https://forum.kirupa.com/t/xml-rotating-banner-help-asap-please/268787
**Category:** flash
**Created:** [August 18, 2008, 8:38pm UTC](https://forum.kirupa.com/t/xml-rotating-banner-help-asap-please/268787 "2008-08-18T20:38:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shinddles](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@Shinddles](https://forum.kirupa.com/u/Shinddles)
#### Post date: [August 18, 2008, 8:38pm UTC](https://forum.kirupa.com/t/xml-rotating-banner-help-asap-please/268787/1 "2008-08-18T20:38:42Z")

</div>

I’m trying to make a similar rotating banner as the one on [www.nationalgeographic.com](http://www.nationalgeographic.com).

I’ve built the movieclip holder with the instance name “bannerholder” and basically want to have the jpegs load via XML and change out every 4/5 seconds (delay times). I wanted it to autoplay and then if you hit a next or previous btn, the banner changes to the next one. Once it gets to the fourth and final banner, it would loop to the first.

Can anyone help me with the first frame actionscript necessary here please? Here’s the XML provided by one of my developers:

\<?xml version=“1.0” standalone=“yes”?\>  
\<NewDataSet\>  
\<xs:schema id=“NewDataSet” xmlns="" xmlns:xs=“[http://www.w3.org/2001/XMLSchema](http://www.w3.org/2001/XMLSchema)” xmlns:msdata=“urn:schemas-microsoft-com:xml-msdata”\>  
\<xs:element name=“NewDataSet” msdata:IsDataSet=“true” msdata:UseCurrentLocale=“true”\>  
\<xs:complexType\>  
\<xs:choice minOccurs=“0” maxOccurs=“unbounded”\>  
\<xs:element name=“BannerItem” msdata:CaseSensitive=“False” msdata:Locale=“en-US”\>  
\<xs:complexType\>  
\<xs:sequence\>  
\<xs:element name=“PrimaryKey” type=“xs:int” /\>  
\<xs:element name=“ImageName” type=“xs:string” minOccurs=“0” /\>  
\<xs:element name=“UrlSet” type=“xs:string” minOccurs=“0” /\>  
\<xs:element name=“DatePosted” type=“xs:dateTime” minOccurs=“0” /\>  
\<xs:element name=“Status” type=“xs:string” minOccurs=“0” /\>  
\<xs:element name=“BeginDate” type=“xs:dateTime” minOccurs=“0” /\>  
\<xs:element name=“EndDate” type=“xs:dateTime” minOccurs=“0” /\>  
\<xs:element name=“RelativeOrder” type=“xs:int” minOccurs=“0” /\>  
\</xs:sequence\>  
\</xs:complexType\>  
\</xs:element\>  
\</xs:choice\>  
\</xs:complexType\>  
\</xs:element\>  
\</xs:schema\>  
\<BannerItem\>  
\<PrimaryKey\>1\</PrimaryKey\>  
\<ImageName\>banner1.jpg\</ImageName\>  
\<UrlSet\>[http://www.testurl.net/](http://www.testurl.net/)\</UrlSet\>  
\<DatePosted\>2008-08-12T00:00:00-05:00\</DatePosted\>  
\<Status\>P\</Status\>  
\<BeginDate\>2008-08-12T00:00:00-05:00\</BeginDate\>  
\<EndDate\>2008-08-30T00:00:00-05:00\</EndDate\>  
\<RelativeOrder\>1\</RelativeOrder\>  
\</BannerItem\>  
\<BannerItem\>  
\<PrimaryKey\>2\</PrimaryKey\>  
\<ImageName\>banner2.jpg\</ImageName\>  
\<UrlSet\>[http://www.rivetglobal.com](http://www.rivetglobal.com)\</UrlSet\>  
\<DatePosted\>2008-08-12T00:00:00-05:00\</DatePosted\>  
\<Status\>P\</Status\>  
\<BeginDate\>2008-08-12T00:00:00-05:00\</BeginDate\>  
\<EndDate\>2008-08-12T00:00:00-05:00\</EndDate\>  
\<RelativeOrder\>2\</RelativeOrder\>  
\</BannerItem\>  
\</NewDataSet\>

Ideally, there will be 4 banners (so imagine a banner4.jpg). I’d greatly appreciate your help. Tuesday deadline…yikes!🙂
