Navigating from One Movie Clip to another - please help !!
I have a button inside a movie clip, when i click on the button, it should go to and play a certain number of frame in another movie clip, please let me know how to do this.
depending how you are coding your buttons there are 2 ways to do this:
if the code is on the button:
on(press){
_root.myMovie_mc.gotoAndPlay(5);
}
if you are coding on the main timeline:
your buttons instance name would be:
myButton
the code:
myButton.onRelease = function(){
myMovie_mc.gotoAndPlay(5);
}
does this answer your question
How do i set the name of the movie clip to myMovie_mc ?!
Forgot to add a thing. I need an action on press and another action onrollover on the button. my current code on the button looks like this -
on (press) {
_root.Symbol7.gotoAndPlay(186); // Symbol7 is the name of the movie clip
}
on (rollOver) {
_root.Symbol9.gotoAndPlay(21); //Symbol9 is the name of the movie clip
}
I can't seem to download.
to give a movie clip an instance name. you click on the movie clip and then look at your properties panel. there will be a textbox on the left under the movieclip dropdown. you name your clip there. it can be whatever you want. that is the name your code will refer to.
when you right the code on your button, you need to know the path to the movie clip.
so if I had a button on the main timeline and wanted to call movieClip_B which is in movieClip_A on the main timeline, i would write my code like this:
not sure if you uploaded the right file. there is no code in the file and it doesn't really make sense with what you said you wanted to do.
on (press) {
_root.Symbol7.gotoAndPlay(186); // Symbol7 is the name of the movie clip
}
on (rollOver) {
_root.Symbol9.gotoAndPlay(21); //Symbol9 is the name of the movie clip
}
symbol 7 which appears to be the clip on the main timeline does not have 186 frames in it. symbol 9 which appears to be the button movie, has only one fram so it can't possibly go to frame 21
I can only assume that what you are trying to do is:
1. on rollover of the button??
2. on press have the black square turn red.
My second part would be - if i rollout of the orange box (move my mouse out of the box - myButton_btn) it should go and play a frame from another movie clip !! how do i do this?