[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

mc unload actions not working

Asked by Justice75 in Adobe Flash

Tags: AS2

Problem:

Every time I try to add code in the menu0 file (attached) in order for the mc to unload whne the mouse is off the text formatting doesnt work  I tried loading them on the main, Didnt work.  I experienced this before but I forgot what the resolve was.  In a nutshell it will not allow "child" text formatting if i target the parent to get to the child and that is the only way that I can access the child to get to its child to access the mc's (button behaviors) to load the mc's into the loader on the main timeline .  I included all of the code for one menu in the MenuMain.  They are all the same but load different mc's to make the different sub(  menus) and mc subs which are in the sub menus and are acting as buttons.  Thanks again for any help that can be gives.


Thanks,

J
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
Problem:
 
Every time I try to add code in the menu0 file (attached) in order for the mc to unload whne the mouse is off the text formatting doesnt work  I tried loading them on the main, Didnt work.  I experienced this before but I forgot what the resolve was.  In a nutshell it will not allow "child" text formatting if i target the parent to get to the child and that is the only way that I can access the child to get to its child to access the mc's (button behaviors) to load the mc's into the loader on the main timeline .  I included all of the code for one menu in the MenuMain.  They are all the same but load different mc's to make the different sub(  menus) and mc subs which are in the sub menus and are acting as buttons.  Thanks again for any help that can be gives.
 
 
Thanks,
 
J
 
 
 
ACTIONS FRAMES
=======================1.this the root
stop(); 
 
=======================2 the is the mc where all the menu assets are the mc's name = mainMenu :  
 
stop();
 
// SET THE MAIN MENU BUTTON ACTIONS
// List pages
var buttonUrl:Array = new Array(
								"sections/home.swf", 
								"sections/about.swf", 
								"sections/portfolio.swf",
								"sections/case.swf",
								"sections/services.swf",
								"sections/client.swf",
								"sections/affiliates.swf",
								"sections/color.swf",
								"sections/referral.swf",
								"sections/contact.swf"
								
								)
;
//Roll Through Buttons
for (var i:Number = 0; i < buttonUrl.length; i++){
	var mm:MovieClip = this["mm" + i];
	
	mm.url = buttonUrl[i];
// On Release Actions	
	mm.onRelease = function(){
		loadMovie(this.url, "_root.holder_main");	
		//trace ("main");
	}
// On Roll Over Actions	
	mm.onRollOver = function(){
	var textColor = new Color (this.sectionName);
	textColor.setRGB(0xF8E1B7);
 
//	Load Sub Buttons & Lines 
	if (this == mm1) {
		_root.mainMenu.attachMovie ("mc_Sub_Menu_0", "menu0", 0);
		menu0._x=113;
		menu0._y=21.6;
	}else if (this == mm2){
		_root.mainMenu.attachMovie ("mc_Sub_Menu_1", "menu1", 0);
		menu1._x=113;
		menu1._y=21.6;
	}else if (this == mm5){
		_root.mainMenu.attachMovie ("mc_Sub_Menu_2", "menu2", 0);
		menu2._x=113;
		menu2._y=21.6;
	}else if (this == mm8){
		_root.mainMenu.attachMovie ("mc_Sub_Menu_3", "menu3", 0);
		menu3._x=113;
		menu3._y=21.6;
	}else if (this == mm9){
		_root.mainMenu.attachMovie ("mc_Sub_Menu_4", "menu4", 0);
		menu4._x=113;
		menu4._y=21.6;
		}
	
	}		
 
//  On Roll Out Actions
	mm.onRollOut = function(){
	var textColor = new Color (this.sectionName);
	textColor.setRGB(0xFFFFFF);
	
	//trace (this.sectionName);
	}		
 
}
 
 
 
=======================3.this one of the attached menus this is menu0 on frame 1
 
 
 
 
 
stop();
 
// SET THE SUB MENU BUTTON ACTIONS
// List pages
var buttonUrl:Array = new Array(
								"section_sub_0", 
								"section_sub_1", 
								"section_sub_2",
								"section_sub_3",
								"section_sub_4"
 
								
								)
;
//Roll Through Buttons
for (var i:Number = 0; i < buttonUrl.length; i++){
	var sm:MovieClip = this["sm" + i];
	
	sm.url = buttonUrl[i];
 
	// On Release Actions	
	
	sm.onRelease = function(){
	// Check To See If SWF Loaded If So Go To Specific Frame		
		//Load SWF		
		_root.holder_main.loadMovie("sections/about.swf");
		//Check If Loaded
		this.onEnterFrame = function() {
    	if (_root.holder_main.getBytesLoaded() >= _root.holder_main.getBytesTotal() && _root.holder_main.getBytesLoaded() > 10) {
		//Load Specific Frame
		_root.holder_main.attachMovie (this.url, this.url, 1);
		delete this.onEnterFrame;
    		}
		};
	}
 
	// On Roll Over Actions	
	sm.onRollOver = function(){
	var textColor = new Color (this.sectionName);
	textColor.setRGB(0xA6874E);
	//trace (this.sectionName);
	}		
 
//  On Roll Out Actions
	sm.onRollOut = function(){
	var textColor = new Color (this.sectionName);
	textColor.setRGB(0x660000);
	
		
}
 
}
 
 
	//works but wont change on rolover behavior
//_root.mainMenu.menu0.onRollOut=function(){
		//	unloadMovie(_root.mainMenu.menu0);
//trace("im having a party");
//}
[+][-]04/06/08 07:11 AM, ID: 21291804Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/07/08 02:37 AM, ID: 21295361Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04/07/08 10:32 PM, ID: 21302819Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04/10/08 06:24 AM, ID: 21324444Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/05/08 07:01 PM, ID: 21725667Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 / EE_QW_2_20070628