on a previous website i made i had this cool way of having the selected page animate on it being loaded up...
however on a new design i cant get it to work saying as instead of using a button as such i am using a movieclip to animate the button and the hit section of the button is actually within the movie clip
the code was this
nextMovie = currMovie = "home_page_mc";
page1_btn_hit.onRelease = function() {
if(currMovie == "page1_mc"){
stop();
}else{
_root[nextMovie].gotoAndPlay("fadeOut");
nextMovie = currMovie = "page1_mc";
}
};
page2_btn_hit.onRelease = function() {
if(currMovie == "page2_mc"){
stop();
}else{
_root[nextMovie].gotoAndPlay("fadeOut");
nextMovie = currMovie = "page2_mc";
}
};
this worked when i was using simple buttons on the same stage as the movieclips which were the pages...
ive tried
_root.page1_btn_hit.onRelease = function()
and all sorts of combinations of _root etc
but i just cant seem to get them to link up with each other how intended
'page1_mc' is the page with the contents on it.
'page1_btn_hit' is the hit section of the button within a movie clip called 'page1_btn_anim_mc'
thanks for any help in advance
however on a new design i cant get it to work saying as instead of using a button as such i am using a movieclip to animate the button and the hit section of the button is actually within the movie clip
the code was this
nextMovie = currMovie = "home_page_mc";
page1_btn_hit.onRelease = function() {
if(currMovie == "page1_mc"){
stop();
}else{
_root[nextMovie].gotoAndPlay("fadeOut");
nextMovie = currMovie = "page1_mc";
}
};
page2_btn_hit.onRelease = function() {
if(currMovie == "page2_mc"){
stop();
}else{
_root[nextMovie].gotoAndPlay("fadeOut");
nextMovie = currMovie = "page2_mc";
}
};
this worked when i was using simple buttons on the same stage as the movieclips which were the pages...
ive tried
_root.page1_btn_hit.onRelease = function()
and all sorts of combinations of _root etc
but i just cant seem to get them to link up with each other how intended
'page1_mc' is the page with the contents on it.
'page1_btn_hit' is the hit section of the button within a movie clip called 'page1_btn_anim_mc'
thanks for any help in advance