# XML menu, setMask?

**URL:** https://forum.kirupa.com/t/xml-menu-setmask/158735
**Category:** Uncategorized
**Created:** [August 11, 2005, 2:51pm UTC](https://forum.kirupa.com/t/xml-menu-setmask/158735 "2005-08-11T14:51:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![coop](https://avatars.discourse-cdn.com/v4/letter/c/87869e/32.png) [@coop](https://forum.kirupa.com/u/coop)
#### Post date: [August 11, 2005, 2:51pm UTC](https://forum.kirupa.com/t/xml-menu-setmask/158735/1 "2005-08-11T14:51:07Z")

</div>

Hi,

Help.

I have list of movieclip/buttons that come from an XML file, which have been placed within a MC on the stage (holder\_mc) using a loop, this is all fine, but I’m now trying to mask part of the holder\_mc, this is’nt working, I can only select the buttons within the mask, which is what I wanted but I can see the rest of the holder\_mc which I dont want. This works without the XML, is this the problem. Hope this make sense, here is the code and fla

```php

my_xml = new XML (); 
my_xml.ignoreWhite = true; 
my_xml.onLoad = function (success) { 
    if (success) { 
        DisplayBands (); 
    } 
    else { 
        trace ("XML not Loaded"); 
    } 
}; 
var btn_spacing = 20; 
my_xml.load ("bands.xml"); 
holder_mc.setMask (mask_mc); 
function DisplayBands () { 
    var start = my_xml.firstChild.childNodes; 
    for (var i = 0; i < start.length; i++) { 
        bands = start*; 
        holder_mc.attachMovie ("btn_mc", "btn_mc" + i, i + 1); 
        holder_mc["btn_mc" + i]._x = btn_spacing; 
        holder_mc["btn_mc" + i]._y = btn_spacing * i; 
        holder_mc["btn_mc" + i].id = bands.attributes.name; 
        holder_mc["btn_mc" + i].image = bands.attributes.image; 
        holder_mc["btn_mc" + i].txt_txt.text = bands.attributes.name; 
        holder_mc["btn_mc" + i].onRollOver = function () { 
            this.txt_txt.textColor = 0xff0000; 
        }; 
        holder_mc["btn_mc" + i].onRollOut = function () { 
            this.txt_txt.textColor = 0x000000; 
        }; 
        holder_mc["btn_mc" + i].onRelease = function () { 
            image_mc.loadMovie (this.image); 
            image_mc._alpha = 0; 
            preloader_mc.bar_mc._alpha = 100; 

```
