# Trouble with tree component with XML

**URL:** https://forum.kirupa.com/t/trouble-with-tree-component-with-xml/150770
**Category:** flash
**Created:** [June 10, 2005, 6:22am UTC](https://forum.kirupa.com/t/trouble-with-tree-component-with-xml/150770 "2005-06-10T06:22:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![deepglue](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@deepglue](https://forum.kirupa.com/u/deepglue)
#### Post date: [June 10, 2005, 6:22am UTC](https://forum.kirupa.com/t/trouble-with-tree-component-with-xml/150770/1 "2005-06-10T06:22:00Z")

</div>

I’ve been trying to figure this out for past 2 days and can’t find a single tutorial or example anywhere.

Here’s my code:

myTreeDP = new XML();  
myTreeDP.ignoreWhite = true;  
myTreeDP.load(“categories.xml”);  
myTreeDP.onLoad = function() {  
myTree.dataProvider = myTreeDP;  
};  
myTreeListener = new Object();  
myTreeListener.change = function(evt:Object) {  
url = evt.target.selectedNode.data;  
MC\_blank.loadMovie(url);  
};  
myTree.addEventListener(“change”, myTreeListener);

What I’m trying to do is play an external .swf (defined in “data” attribute in XML file) inside an empty movieclip when the user clicks on a LEAF node. With the code above (which I found somewhere) the movie attempts to play when user clicks on ANY node, but that’s not what I need.

I also get this error message when a node is clicked:  
Error opening URL “file:///D|/test/undefined”

Paths are set correctly.

I figure this should be pretty simple but I’m not very familiar with AS.

I’m about to go nuts. Thanks in advance for any help!
