[SIZE=3][FONT=Times New Roman]Hey peeps.[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3](this could be difficult to explain, esp on a friday :puzzle:!!) [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]I have this code [COLOR=red]below [/COLOR][COLOR=black]which works well to a certain extent. This code is on the ‘PROFILE.swf’. On this page there is a sub menu containing 4 buttons: [COLOR=red][COLOR=blue]Biogs,[/COLOR] Awards, Charity, Publications.[/COLOR] When one of the the last 3 buttons are clicked the text already on the page fades away and the relevant, new, swf is loaded in place. Now because within each new swf there are more catergories in the sub menu to choose from, the buttons are also loaded with the new swf. [/COLOR][/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]This means that after the first button is clicked, this code nolonger works as the target path changes. Initially the buttons are in Container2, then once the first button is loaded the buttons are in sub_cntr. My question is: Is it possible to write the code so that the target path is checked to both CONTAINER2 and SUB_CNTR? :q: [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Any questions, if not understood, please ask![/SIZE][/FONT]
[SIZE=3][SIZE=3][FONT=Times New Roman]arrName = [“awards.swf”,“charity.swf”,“publications.swf”]
function sub_menu(refName) {
_root.container2.main_txt._alpha = 0;
_root.container2.sub_txt._alpha = 0;
_root.container2.loadMovie(refName);
_root.container2.alphaTo(100,1,“easeOutCubic”);
}[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]_root.container2.btns_mc.awards_btn.onRelease = function () {
sub_menu(arrName[0]);
_root.sub_cntr.unloadMovie(“charity.swf”, “publications.swf”)
}
_root.container2.btns_mc.charity_btn.onRelease = function () {
sub_menu(arrName[1]);
_root.container2.btns_mc.unloadMovie(“awards.swf”,“publications.swf”)
}
_root.container2.btns_mc.publications_btn.onRelease = function () {
sub_menu(arrName[2]);
_root.container2.btns_mc.unloadMovie(“awards.swf”,“charity.swf”)
}[/FONT][/SIZE]
[/SIZE]