-
Ok, im really stuck here.
I have navigation buttons + I want to play the same general movie clip, and then go to the movie clip I just pressed.
Here is an example:
I have buttons labeled 1 to 5. Say I want to press 2. It then plays a general movie clip + then goes to 2. I want the general movie clip to be played before all destination clips.
Does anyone know what i'm talking about?
Thanks
zerodonor
-
I found the answer..I
Wow, the first variable I have ever used..
I just made it work, i dont know if the code is right, but it works..any suggestions:
On each of the buttons i had this code:
on (release) {
nav = "1";
gotoAndPlay ("generalmc");
}
* nav changed with each button..
The clip that i wanted to play at first was labeled generalmc ..
At the end of the generalmc is this code:
if (nav == 1) {
gotoAndPlay ("one");
} else if (nav == 2) {
gotoAndPlay ("two");
} else if (nav == 3) {
gotoAndPlay ("three");
}
I had labeled the destination clips one, two and three..
Tell me if the code is right.
I know this is really basic, but anyway.
The only thing that didn't work was when I confused == with = .
see ya
zerodonor
-
Well, this code should work by itself, but I think you can improve it a bit.
I suggest you name your movieclips not one, two or three, but 1, 2 and 3. You should also replace:
on (release) {
nav = "1";
gotoAndPlay ("generalmc");
}
by:
on (release) {
nav = 1; //no quotes
gotoAndPlay ("generalmc");
}
Then at the end of generalmc you replace:
if (nav == 1) {
gotoAndPlay ("one");
} else if (nav == 2) {
gotoAndPlay ("two");
} else if (nav == 3) {
gotoAndPlay ("three");
}
by:
gotoAndPlay (nav);
succes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|