MC inside MC, no response
Hi all,
I have a simple nav made by attaching MC’s (btn_mc)from the library. The MC’s that are attached contain a base_mc and two MC 's on top of the base_mc that act as buttons. I wanted the whole MC to have a rollover effect but then still have the two MC buttons inside to still be clickable, so I changed the base_mc alpha on rollover and then changed it back on rollout. If I do it this way the two MC inside aren’t clickable, but if I take away the alpha change on the base_mc the two MC work.
Does anyone know a way around this or know of another way I can do this.
changeColor = function (tar, col) {
banColor = new Color(tar);
banColor.setRGB(col);
};
//--------------------
// Load XML
//--------------------
cart_xml = new XML();
cart_xml.ignoreWhite = true;
cart_xml.onLoad = function(success) {
if (success) {
cart();
} else {
trace("cart xml not loaded");
}
};
cart_xml.load("cart.xml");
cart = function () {
proNames = cart_xml.firstChild.childNodes;
for (var i = 0; i<proNames.length; i++) {
fontInfo = proNames*;
buy = Holder_mc.attachMovie("btn_mc", "btn_mc"+i, i+1);
buy.useHandCursor = false;
buy._y = 26*i;
buy.idcolor = fontInfo.attributes.color;
buy.name = fontInfo.attributes.name;
buy.name_txt.text = buy.name;
buy.one_mc.onRollOver = function() {
trace(this.buy.name+"ONE");
};
buy.two_mc.onRollOver = function() {
trace("TWO");
};
changeColor(buy.base_mc, buy.idcolor);
//
if (buy.name != "ONE" && buy.name != "TWO") {
buy.base_mc._alpha = 50;
buy.onRollOver = function() {
this.base_mc._alpha = 100;
};
buy.onRollOut = function() {
this.base_mc._alpha = 50;
};
buy.onRelease = function() {
trace(this.name);
};
}
}
};