|
-
damn, im smooth
4 buttons that lead to the same place, then separate
confusing subject for a confusing problem! 
i have one scene with 4 buttons. what i WANT to have happen is, no matter which of the buttons you click, A, B, C, or D, you automatically go to frame, say, 500 of the scene.
at frame 500, a little animation plays.
when the animation is complete, you're sent to a different scene, depending upon what button you originally clicked. button A would send you to scene A, button B to scene B, etc.
but all of those buttons must first pass through the same frame 500 of scene 1.
its annoying and ridiculous, and sounds like it could be avoided or duplicated, but because of fluid animation in this case, it cant 
any help?
i'm not new to action scripting. i'm just bad at it.
-
me too!
I'm actually looking for something very similar.
Hopefully someone can help!
-
damn, im smooth
i'm not new to action scripting. i'm just bad at it.
-
sure it is 
Create a variable when you press any of the buttons.
When you reach the end of the animation on frame 500 you use a little check to see what's in the variable and then decide to which frame to go next to.
example
frame 1:
buttonClicked = "A"
frame 500:
if (buttonClicked == "A") {
gotoAndPlay(100);
} else if (buttonClicked == "B") {
gotoAndPlay(200);
} else if (buttonClicked == "C") {
gotoAndPlay(300);
} else if (buttonClicked == "D") {
gotoAndPlay(400);
}
sig? I don't have a sig. euhm.. no wait! this is IT!
-
damn, im smooth
heya mediamonkey! 
im not exactly sure i understand that, but lemme detail what i tried in an attempt:
in frame 1 where the 4 buttons are, i gave each an instance name, A,B,C,D.
then, in frame 500 i entered this code into a frame:
if (buttonClicked == "A") {
gotoAndPlay("scene3", 1);
} else if (buttonClicked == "B") {
gotoAndPlay("scene4", 1);
} else if (buttonClicked == "C") {
gotoAndPlay(300);
} else if (buttonClicked == "D") {
gotoAndPlay(400);
}
buuuut... that still doesnt work. what'd i mess up here?
i'm not new to action scripting. i'm just bad at it.
-
damn, im smooth
doh!
waitaminute, i got it! 
the buttons cant just have instance names, they gotta have the variable put into the release action. phew!
i'm up and running now -- thanks for the help mediamonkey!
i'm not new to action scripting. i'm just bad at it.
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
|