954,598 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

navigation with a movie clip

is it possible tpo have a movie clip use the gotoAndPlay function without converting it to a button.

kevin wood
Posting Whiz
347 posts since Feb 2008
Reputation Points: 27
Solved Threads: 1
 

its very possible in fact movieclips are used more often as buttons than the actual button symbols them selves. this is because movieclips have a variety of functions that buttons dont.

coming to your question. a movieclip can have its own time line and therefore the gotoAndPlay event can be triggered with or within a movieclip

paulsho
Newbie Poster
6 posts since Aug 2008
Reputation Points: 10
Solved Threads: 2
 

i have set my timeline inside the movie clip up so that i have my frame labels for the up, over and out states. the problem i am having is that when the mouse moves over the movie clip it is not playing the animation.

i have set the script up on the main timeline so that the animation should play but it is not. the code i have used on the main timeline looks like this

this.prof_mc.onRollOver = function() {
	prof_mc.gotoAndPlay("over");
};
this.prof_mc.onRollOut = function() {
	prof_mc.gotoAndPlay("out");
};


i have put a on release function on the movie clip on the main stage and this is not working. when the movie clip is pressed once it is playing the over state from inside the movie clip and when it is pressed again it plays the out state of the movie clip which should not be happening.

the on release on the movie clips has been scripted like this

on (release){
	gotoAndPlay("_about");
}


i have set up the timeline with frame labels for the individual pages with "_about" being one of the pages i have set up.

if someone could tell me where i have gone wrong that would be great as i have not a clue why it is behaving in this way.

kevin wood
Posting Whiz
347 posts since Feb 2008
Reputation Points: 27
Solved Threads: 1
 

i worked this out a few days ago forgot to come back and post my answer. to get the gotoAndPlay to work how i wanted it to i had to tell the playhead which level i wanted it to gotoAndPlay on, the code which worked for me is as follows

on (release) {
	_level0.gotoAndPlay("_about");
}
kevin wood
Posting Whiz
347 posts since Feb 2008
Reputation Points: 27
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: