# Help with \_root

**URL:** <https://forum.kirupa.com/t/help-with--root/222719>\
**Category:** Uncategorized\
**Created:** [April 16, 2007, 2:54pm UTC](https://forum.kirupa.com/t/help-with--root/222719 "2007-04-16T14:54:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielMcL](https://avatars.discourse-cdn.com/v4/letter/d/b5a626/32.png) [@DanielMcL](https://forum.kirupa.com/u/DanielMcL)\
**Post date:** [April 16, 2007, 2:54pm UTC](https://forum.kirupa.com/t/help-with--root/222719/1 "2007-04-16T14:54:58Z")

</div>

I’m creating a dynamic set of buttons who’s properties are loaded from an external xml file. All works fine until it’s loaded within another flash application. I’ve read through the [FAQ](http://www.kirupa.com/forum/showpost.php?p=1922775) on the matter and having no luck with point two (\_lockroot). I’m quite new to flash although coming form javascript I’ve a good grasp of actionscript. If someone could help with either of the two other method presented in the FAQ that would be great.

```auto

var myXML = new XML();
myXML.ignoreWhite = true;
myXML.load('links.xml');
myXML.onLoad = function(success) {
 if (success) {
  var links = this.firstChild.childNodes;
  for (i=0; i<links.length; i++) {
   var btn = _root.attachMovie('mc_Button', 'mc_Button'+i, _root.getNextHighestDepth(), {_alpha:0});
   btn.url = links*.attributes.url;
   btn._x = parseInt(links*.attributes.left);
   btn._y = parseInt(links*.attributes.top);
   btn._width = parseInt(links*.attributes.width);
   btn._height = parseInt(links*.attributes.height);
   btn.onPress = function() {
    getURL(this.url, '_blank');
   };
  }
 } else {
  trace("XML didn't load.");
 }
};

```
