# Xml external swf's trouble

**URL:** <https://forum.kirupa.com/t/xml-external-swfs-trouble/276540>\
**Category:** Uncategorized\
**Created:** [November 30, 2008, 2:48pm UTC](https://forum.kirupa.com/t/xml-external-swfs-trouble/276540 "2008-11-30T14:48:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neil\_c](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@neil\_c](https://forum.kirupa.com/u/neil_c)\
**Post date:** [November 30, 2008, 2:48pm UTC](https://forum.kirupa.com/t/xml-external-swfs-trouble/276540/1 "2008-11-30T14:48:53Z")

</div>

I hope somebody can help me with a problem i am having…

I have a .swf(main.swf) which contains 2 moveclips. (content\_mc & menu\_mc)  
Each movie clip loads an swf file.

The swf i am tryin to load into content\_mc is ‘audio.swf’ which contains individual buttons to play individual tracks via xml date.

## audio.swf works fine when i test it, but when i play the ‘audio.swf’ within ‘main.swf’ in the content\_mc, i am gettin an error saying 'Error opening url http://…/undefined

My xml

[COLOR=red]\<?xml version=“1.0”?\>[/COLOR]  
[COLOR=red]\<dukeBox\>  
\<Track1\>  
\<title\>GregCerrone-Bullit(MilesDysonRemixOnTheAirMusic.mp3\</title\>  
\</Track1\>

\<Track2\>  
\<title\>file:///C|/Users/Neil/Desktop/DBD/track2.mp3\</title\>  
\</Track2\>

\<Track3\>  
\<title\>track3.mp3\</title\>  
\</Track3\>

\</dukebox\>  
[/COLOR][COLOR=red]  
[COLOR=black]-----------------------------------------------------------------------------[/COLOR]  
[COLOR=#000000]My Actionscript[/COLOR]  
[COLOR=#000000][/COLOR]  
[COLOR=navy]var x:XML = new XML();  
x.ignoreWhite = true;[/COLOR]  
[COLOR=navy]var tracks:Array = new Array();[/COLOR]  
[COLOR=navy]// Reads xml  
x.onLoad = function (){  
body.setTextFormat(formatter);  
var trackNo:Array = this.firstChild.childNodes;  
for (i=0;i\<trackNo.length;i++)  
{  
tracks.push(trackNo\*.childNodes[0].childNodes[0].nodeValue);  
}

//counts how many are in the list.  
\_root.projectCount = this.firstChild.childNodes.length;  
trace(\_root.projectCount);

// Loop through the projects array assigning each track from the xml  
for (count = 0; count \< projectCount; count++) {

track1 = tracks[0];  
track2 = tracks[1];  
track3 = tracks[2];  
}  
}[/COLOR]  
[COLOR=navy]// Setting up sound and buttons[/COLOR]  
[COLOR=navy]// assignes a new sound to Title using soundLoader  
Tune = new Sound (soundLoader);[/COLOR]  
[COLOR=navy]// Button 1  
s1\_play.onRelease = function ()  
{  
Tune.loadSound(track1, true);  
}[/COLOR]  
[COLOR=navy]// Button 2  
s2\_play.onRelease = function ()  
{  
Tune.loadSound(track2, true);  
}[/COLOR]  
[COLOR=navy]// Stops sounds  
stop\_btn.onRelease = function ()  
{  
stopAllSounds();  
}[/COLOR]  
[COLOR=navy] // Load xml  
x.load(“playlist.xml”);  
[/COLOR][COLOR=navy][COLOR=black]-------------------------------------------------------------------------------------[/COLOR][/COLOR]  
[COLOR=navy][COLOR=#000000]I hope someone can help me out… Heres a link to what i have done so far, you might understand what i am tryin to achieve better if u see this…[/COLOR][/COLOR]  
[COLOR=navy][COLOR=#000000][/COLOR][/COLOR]  
[COLOR=navy][COLOR=#000000][click here](http://neilcarpenter.freehostia.com/dbd/main.html)[/COLOR][/COLOR]  
[COLOR=navy][COLOR=#000000][/COLOR][/COLOR]  
[COLOR=navy][COLOR=#000000]thanks.[/COLOR][/COLOR]  
[COLOR=navy][COLOR=#000000]Neil[/COLOR]  
[/COLOR][/COLOR]
