# Load swf's from xml auto play

**URL:** <https://forum.kirupa.com/t/load-swfs-from-xml-auto-play/235884>\
**Category:** flash\
**Created:** [August 15, 2007, 3:44pm UTC](https://forum.kirupa.com/t/load-swfs-from-xml-auto-play/235884 "2007-08-15T15:44:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThirstyPiranha](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thirstypiranha/32/3996_2.png) [@ThirstyPiranha](https://forum.kirupa.com/u/ThirstyPiranha)\
**Post date:** [August 15, 2007, 3:44pm UTC](https://forum.kirupa.com/t/load-swfs-from-xml-auto-play/235884/1 "2007-08-15T15:44:00Z")

</div>

i’m trying to load multiple swf’s from XML and play them one after the other until the end then start over with the first swf.

i’ve loaded my XML and get undefined for the file but it exist not sure what i’m doing with this. any help would be awesome.

my XML looks like this

[**[FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT]**](file:///D:/BUSINESS/clients/AdRever/playlist1.xml#) [COLOR=#0000ff]\<[/COLOR][COLOR=#990000]adSet[/COLOR][COLOR=#0000ff]\>[/COLOR]  
**[FONT=Courier New][COLOR=#ff0000] [/COLOR][/FONT]** [COLOR=#0000ff]\<[/COLOR][COLOR=#990000]filename[/COLOR][COLOR=#0000ff]\>[/COLOR] **media/test1.swf** [COLOR=#0000ff]\</[/COLOR][COLOR=#990000]filename[/COLOR][COLOR=#0000ff]\>[/COLOR]

**[FONT=Courier New][COLOR=#ff0000] [/COLOR][/FONT]** [COLOR=#0000ff]\<[/COLOR][COLOR=#990000]filename[/COLOR][COLOR=#0000ff]\>[/COLOR] **media/test2.swf** [COLOR=#0000ff]\</[/COLOR][COLOR=#990000]filename[/COLOR][COLOR=#0000ff]\>[/COLOR]

[COLOR=#0000ff]\</[/COLOR][COLOR=#990000]adSet[/COLOR][COLOR=#0000ff]\>[/COLOR]

```auto
 
var xmlDoc:XML = new XML(); 
System.useCodepage = true; 
xmlDoc.ignoreWhite = true; 
xmlDoc.onLoad = function(ok:Boolean) { 
if (ok) { 
doMenu(this); 
} else { 
trace("XML did not load"); 
} 
}; 
xmlDoc.load("playlist.xml"); 
function doMenu(xml:XML) { 
var num:Number = xml.firstChild.childNodes.length; 
ads = new Array(); 
for (var i = 0; i < num; i++) { 
ads* = xml.firstChild.childNodes*.attributes.image; 
} 
loadMovie(ads*,1);
} 

```
