View Full Version : buttons linking to different frames in movie clipp
biohazrd6
02-24-2002, 10:45 PM
I have a movie clip with three buttons in it. I need each button to link to 3 different frames in another movie clip. I have a frame label for the movie clip called "setup". Inside this there are 3 frame labels "powder", "copper", and "coal". Right now I have this:
on (release)
{
_root.gotoAndPlay("setup");
}
How can I get each button to link to a respective frame label?
Rupert
02-25-2002, 01:58 AM
try:
on (release) {
_root.setup.gotoAndPlay("lablenamehere");
}
If that isn't working for you - check that you have correctly named your movieClip - setup - on the stage and not actually given it a Label - there is a big difference!
Cheers,
R
biohazrd6
02-25-2002, 07:30 PM
thanks for your help. I had tried what you said before but it didn't work. I checked the movie clip and its instance name is correct also. Still looking for a solution though.
Billy T
02-25-2002, 07:55 PM
are you sure you have given it an instance name and not just named the symbol in the library?
biohazrd6
02-25-2002, 08:07 PM
i am positive. I have 4 movie clips on the main timeline and each has an instance name.
Rupert
02-25-2002, 10:10 PM
Hmm. I just re-read your first post on this.
I have a frame label for the movie clip called "setup". Inside this there are 3 frame labels "powder", "copper", and "coal".
If I take what you have said as gospel - It would say to me that you are trying to click a button in a movieClip AND go to another frame (labelled "setup") that contains a movieClip. Inside that clip are 3 frame labels "powder", "copper", and "coal".
If this is the case, and I will assume it is until you say otherwise - you will need to do some things a bit different:
Remembering you can't target something on the timeline that doesn't exist until later in your movie.
try putting something like this on each button:
on (release) {
_root.buttonPushed = "powder"; // change this for each button
_root.gotoAndStop("setup");
}
then on your movieClip in "setup" you could put an onClip event:
onClipEvent (load) {
if (_root.buttonPushed == "powder") {
_root.setup.gotoAndPlay("powder");
trace ("powder");
}
if (_root.buttonPushed == "copper") {
_root.setup.gotoAndPlay("copper");
trace ("copper");
}
if (_root.buttonPushed == "coal") {
_root.setup.gotoAndPlay("coal");
trace ("coal");
}
}
biohazrd6
02-25-2002, 10:34 PM
Thank you for your reply. I tried what you said but it didn't work It probably has to do witht the fact that the instance name of the movie clip is "setup", not a frame label. My mistake. I understand the problem I'm having better so here it is (hopefully clearer)
On my main time line I have 4 movie clips each with an instance name. In the first MC called "intro" there is a button that must lead to the second MC. In the 2nd MC called "choose" there are 3 buttons. I'm trying to get each button to link to a respective frame label "powder", "copper" and "coal", which are in the 3rd movie clip called "setup".
i hope that is clearer. Does that change anything? Please help... this problem is at the beginning of this project and I can't go on until I figure this out.
Rupert
02-25-2002, 10:39 PM
Ok first question: Are all your 3 movieclips on stage at once in frame 1?
If not, tell me what your setup is -ie. which clip is in which frame?
R
biohazrd6
02-26-2002, 01:14 AM
Each MC is in a different frame on the main timeline. MC 1 is in frame 1, 2 in 2, and so forth.
Rupert
02-26-2002, 04:07 AM
I started trying to explain again but it might be easier if you just check the attached file. You said there were 4 mcs but your description only talks about 3 of them so that is what I have built for you.
Cheers
R
biohazrd6
02-26-2002, 05:08 AM
Rupert... You are the man!!! It worked. Thank you so much for taking the time to do that. This thing was killing me. Not even my professor could tell me what to do. Shows how much they know. I can't tell you how much I appreciate this. Thanks again.
Rupert
02-26-2002, 05:13 AM
Hey you're welcome! We got there eventually.
I'm going home now - long day today...
... need sleep...
zzzzzz
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.