shorescores
01-28-2009, 09:08 PM
Newbie question - I can't re-enable a button inside of an external swf. As brief as I can describe my FLA structures below:
My main movie is "home.swf" The root timeline contains a preloader and an empty movie clip, "container_mc" Inside "container_mc" is a navigation menu with buttons. I want the button "highlightTemp_btn" to disable after loading an external SWF - the ActionScript:
// Nav
highlightTemp_btn.onRelease = function() {
loadMovie("Highlight_TempLang.swf", 1);
highlightTemp_btn.enabled=false;
};
Works fine - the external SWF plays on Level 1, and the instance of highlightTemp_btn is disabled.
Inside the external SWF, named "Highlight_TempLang.swf", I have a root timeline with a preloader and an empty movie clip, "container_mc" Inside of "container_mc" is a button, "close_btn" which closes the swf on Level 1 and returns to the home page on Level 0.
MY PROBLEM: I can't re-enable the highlightTemp_btn in my main movie, most likely because I am not correctly targeting it:
// close the MC on Level 1 and enable highlightTemp_btn
close_btn.onRelease = function() {
unloadMovieNum(1);
_parent._parent._parent.highlightTemp_btn.enabled= true;
trace("OFF");
};
** I have tried various multiples of "_parent." to try and get that highlightTemp_btn to work. I have also tried using levels. Since my "home.swf" uses a "container_mc" where the "highlightTemp_btn" exists, I am failing to target it.
Currently this is being published for Flash 6 (a sad and different story).
Any help is greatly appreciated!
- shorescores
My main movie is "home.swf" The root timeline contains a preloader and an empty movie clip, "container_mc" Inside "container_mc" is a navigation menu with buttons. I want the button "highlightTemp_btn" to disable after loading an external SWF - the ActionScript:
// Nav
highlightTemp_btn.onRelease = function() {
loadMovie("Highlight_TempLang.swf", 1);
highlightTemp_btn.enabled=false;
};
Works fine - the external SWF plays on Level 1, and the instance of highlightTemp_btn is disabled.
Inside the external SWF, named "Highlight_TempLang.swf", I have a root timeline with a preloader and an empty movie clip, "container_mc" Inside of "container_mc" is a button, "close_btn" which closes the swf on Level 1 and returns to the home page on Level 0.
MY PROBLEM: I can't re-enable the highlightTemp_btn in my main movie, most likely because I am not correctly targeting it:
// close the MC on Level 1 and enable highlightTemp_btn
close_btn.onRelease = function() {
unloadMovieNum(1);
_parent._parent._parent.highlightTemp_btn.enabled= true;
trace("OFF");
};
** I have tried various multiples of "_parent." to try and get that highlightTemp_btn to work. I have also tried using levels. Since my "home.swf" uses a "container_mc" where the "highlightTemp_btn" exists, I am failing to target it.
Currently this is being published for Flash 6 (a sad and different story).
Any help is greatly appreciated!
- shorescores