# MC response inside nav

**URL:** https://forum.kirupa.com/t/mc-response-inside-nav/212520
**Category:** flash
**Created:** [January 11, 2007, 6:31pm UTC](https://forum.kirupa.com/t/mc-response-inside-nav/212520 "2007-01-11T18:31:33Z")
**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: [January 11, 2007, 6:31pm UTC](https://forum.kirupa.com/t/mc-response-inside-nav/212520/1 "2007-01-11T18:31:33Z")

</div>

MC response inside nav

Hi all,

This has been driving me mad for days so I would really appreicate if anyone can help.  
I have a vertical menu made by attaching btn\_mc from the libaray using an XML file. The btn\_mc is a MC which has three MC’s inside - base\_mc, one\_mc and two\_mc, I set the alpha of all MC’s to 50. I want to be able to rollOver one\_mc and two\_mc and it’s alpha change to 100 and also change the alpha of base\_mc 100, but rolling over base\_mc won’t change it’s alpha. I know this is to do with the parent clip having actions attached, but if I do without the xml using this code below it works fine.

```auto

btn_mc.base_mc._alpha = 50;
btn_mc.two_mc._alpha = 50;
btn_mc.one_mc._alpha = 50;
btn_mc.two_mc.onRollOver = function() {
	this._alpha = 100;
	btn_mc.base_mc._alpha = 100;
};
btn_mc.two_mc.onRollOut = function() {
	this._alpha = 50;
	btn_mc.base_mc._alpha = 50;
};
btn_mc.one_mc.onRollOver = function() {
	this._alpha = 100;
	btn_mc.base_mc._alpha = 100;
};
btn_mc.one_mc.onRollOut = function() {
	this._alpha = 50;
	btn_mc.base_mc._alpha = 50;
};
btn_mc.one_mc.onRelease = function() {
	trace("One");
};
btn_mc.two_mc.onRelease = function() {
	trace("Two");
};

```

This is the code I’m using with the XML file

```auto

var btnSpace = 35;
//--------------------
// Change Color
//--------------------
changeColor = function (tar, col) {
	banColor = new Color(tar);
	banColor.setRGB(col);
};
//--------------------
// Load XML
//--------------------
btn_xml = new XML();
btn_xml.ignoreWhite = true;
btn_xml.onLoad = function(success) {
	if (success) {
		btnTest();
	} else {
		trace("cart xml not loaded");
	}
};
btn_xml.load("cart.xml");
btnTest = function () {
	proNames = btn_xml.firstChild.childNodes;
	for (var i = 0; i<proNames.length; i++) {
		fontInfo = proNames*;
		btn = holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);
		btn._y = btnSpace*i;
		btn.idcolor = fontInfo.attributes.color;
		btn.name_txt.text = fontInfo.attributes.name;
		changeColor(btn.base_mc, btn.idcolor);
		changeColor(btn.one_mc, btn.idcolor);
		changeColor(btn.two_mc, btn.idcolor);
		btn.base_mc._alpha = btn.one_mc._alpha=btn.two_mc._alpha=50;
		btn.one_mc.onRollOver = function() {
			this._alpha = 100
			btn.base_mc._alpha = 100
		};
		btn.two_mc.onRollOver = function() {
			this._alpha = 100
			btn.base_mc._alpha = 100
		};
		btn.one_mc.onRollOut = function() {
			this._alpha = 50
			btn.base_mc._alpha = 50
		};
		btn.two_mc.onRollOut = function() {
			this._alpha = 50
			btn.base_mc._alpha = 50
		};
	}
};

```

Here is an example of how it should work

[http://homepage.ntlworld.com/c.\*\*\*\*inson40/](http://homepage.ntlworld.com/c. **** inson40/)
