Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems linking to buttons

Status
Not open for further replies.

abbott567

Technical User
Jun 18, 2007
38
0
0
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top