View Full Version : problem with scenes
Daniel Posada
08-03-2003, 03:01 PM
Hi, I need to know how to make two buttons. the two buttons should play the same part of my animation, but when that part finishes each button should take me to a different scene.
I'm really new with flash and i dont seem to get it right.
Thanks for your time.
Ms.Latte
08-03-2003, 04:16 PM
I don't understand ... How do you have it set up? could u show an example of what your trying to do?
Daniel Posada
08-03-2003, 04:28 PM
well, lets think we have buttons A and B, if you push either one it will play frames 4 to 25, but after that, A button will take you to scene 3, while button B takes you to scene 7.
Colin Campbell
08-03-2003, 04:28 PM
I'm planning the same way he is... he has a button on say frame 5, then he wants the animation to play out until say frame 20. On frame 20 he wants the as to figure out which button was pressed and go to thatt specific scene.
Daniel Posada
08-03-2003, 04:40 PM
That's exactly my problem.
Ms.Latte
08-03-2003, 05:57 PM
have buttonA have this in its script:
on (release) {
var buttonA = true;
gotoAndPlay(yourAnimation);
}
buttonB:
on (release) {
gotoAndPlay(yourAnimation);
}
on the last frame of "yourAnimation":
if (buttonA == true) {
gotoAndPlay("Scene 2", 1);
} else {
gotoAndPlay("Scene 3", 1);
}
Daniel Posada
08-03-2003, 06:05 PM
what about if need to do this with more than two Buttons?
Ms.Latte
08-03-2003, 06:12 PM
how many buttons are u talking about? the structure doesn't really change... could u elaborate?
Daniel Posada
08-03-2003, 06:21 PM
HEY, Ms.Latte, i got it, is just like you said, but without the "else" part.
Thanks a lot, really, I mean it.
ˇyour the best!
Bye, and thanks again.
Colin Campbell
08-03-2003, 06:40 PM
I'm kind of interested in this code, so I'm just going to practice it here :p
btn= new Array [button1_mc, button2_mc, button3_mc, button4_mc]
for (i=0, i<btn._length,i++){
_root.btn[i].onRelease () {
var btn[i] = true;
gotoAndPlay (3);
}
}
//on last frame:
if (btn[i]= true) {
gotoAndPlay ("scene [i]", 1);
}
Would that work? I just wrote that up now....
JHallam
08-03-2003, 07:50 PM
Originally posted by colin14
[B]I'm kind of interested in this code, so I'm just going to practice it here :p
because it will work 'n all...why ask us? we are not the flash player....go try yourself....thats the only way to learn! :p
Colin Campbell
08-03-2003, 08:20 PM
no no no, I was praticing here, so I could be critisized! :p Of course I'm trying it out by myself on the flash player!
JHallam
08-03-2003, 08:27 PM
Originally posted by colin14
Would that work? I just wrote that up now....
hmmmm... heh :p
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.