PDA

View Full Version : Masking XML menu



Ivan Sorkin
July 28th, 2005, 06:32 AM
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.

Ivan Sorkin
July 28th, 2005, 09:13 AM
Please help.
Maybe you need some more information, than ask me please.
I can put fla file if you want.

stringy
July 28th, 2005, 11:09 AM
Please help.
Maybe you need some more information, than ask me please.
I can put fla file if you want.

you can only mask one clip at once using setMask()
try attaching to an empty movieclip and then masking that.
you`ll have to change the paths then for your rollOvers etc

Ivan Sorkin
July 29th, 2005, 06:22 AM
Ok, thank you very much.
Could you tell me more what pathces do I have to change after and how?
and how can I also put rollovers that would scrool this menu up and down?