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




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

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.

Actionscript:
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


Actionscript:
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[i];
		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.dickinson40/
Attached Files
File Type: zip forumCart.fla.zip (8.7 KB, 1 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
MC inside MC, no response scooper Flash MX 1 01-09-2007 11:37 PM
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
Load movie, nav bar, ahhhhh??? macflasher Flash 5 and below 3 04-17-2001 11:51 AM




All times are GMT. The time now is 12:43 PM.