# Masking XML menu

**URL:** https://forum.kirupa.com/t/masking-xml-menu/156843
**Category:** flash
**Created:** [July 28, 2005, 10:32am UTC](https://forum.kirupa.com/t/masking-xml-menu/156843 "2005-07-28T10:32:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ivan\_Sorkin](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@Ivan\_Sorkin](https://forum.kirupa.com/u/Ivan_Sorkin)
#### Post date: [July 28, 2005, 10:32am UTC](https://forum.kirupa.com/t/masking-xml-menu/156843/1 "2005-07-28T10:32:29Z")

</div>

Please, I’m trying to make a mask for this menu, I was trying in many different ways, but I still do not understand why it doesn’t work.

> menu = new XML();  
> menu.ignoreWhite = true;  
> menu.load(“the destination That we are loadin xml from”);  
> menu.onLoad = function() {  
> items = this.firstChild.childNodes;  
> for (a=0; a\<=items.length-1; a++) {  
> \_root.attachMovie(“mcMenuItem”, “item”+a, a);  
> \_root[“item”+a].nametxt.text = items[a].attributes.pname;  
> \_root[“item”+a].\_y = 24\*a;  
> \_root[“item”+a].\_y += 203;  
> \_root[“item”+a].\_x = 93;  
> \_root[“item”+a].id = items[a].attributes.id;  
> //Here we attach the mask to our menu  
> //\_root.attachMovie(“mcMenuMask”, “mcMask”, \_root.getNextHighestDepth());  
> //\_root.mcMask.\_y = 300;  
> //\_root.mcMask.\_x = 95;  
> //\_root[“item”+a].setMask(mcMask);  
> //This command attaches movie with the main text movie  
> attachMovie(“mcMainText”, “mcNewMainText”, 100);  
> mcNewMainText.\_x = 291;  
> mcNewMainText.\_y = -71;  
> //here are the properties for buttons  
> \_root[“item”+a].onRollOver = function() {  
> this.\_alpha = 85;  
> };  
> \_root[“item”+a].onRollOut = function() {  
> this.\_alpha = 100;  
> };  
> \_root[“item”+a].onRelease = function() {  
> attachMovie(“mcThumbnails”, “mcCocos”+\_root[“item”+a].id, 100);  
> \_root.catId = this.id;  
> trace(“cat id=”+\_root.catId);  
> };  
> }  
> };

That was the code of menu. This menu is inside the main movieclip. But I want to mask this menu incase making the shape of the last and first button.
