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");
//}
|