LOADING
Loading
Hi , welcome back.
LogoutLOGOUT
 
  Lost password?  
Hi
 




 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-09-2007, 08:11 AM
scooper scooper is offline
Registered User
 
Join Date: Aug 2005
Posts: 11
Rep Power: 0
scooper is on a distinguished road
MC inside MC, no response

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.

Actionscript:
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);
			};
		}
	}
};
Attached Files
File Type: zip forumCart.fla.zip (6.5 KB, 2 views)
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Button inside Movieclip with actions gueycito Flash CS3 / Flash 9 5 10-30-2009 03:19 PM
MC response inside nav scooper Flash MX 2 01-12-2007 07:36 AM
How to modify a SQL query inside an ASP-page using Flash variables values? Andino Web Platforms - PHP, JSP and .NET 6 07-20-2006 08:37 PM
Not able to get the lines inside scrollpane superprg1 Flash MX 2004 3 10-23-2005 06:21 PM
Problems animating a movieclip inside a moviclip inside another movieclip alkiev Flash MX 2004 2 10-14-2005 02:42 AM




All times are GMT. The time now is 07:37 AM.