MC inside MC, no response

  • cooper10
  • Born
  • Born
  • cooper10
  • Posts: 3

Post 3+ Months Ago

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.

[as]
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[i];
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);
};
}
}
};
[/as]
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

Already been explained this. For the nested mc-s, rolls, press, release don't work if their parent has a rollover, press or release function associated. To workaround, use mouseMove method and hitTarget function.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.