Click to See Complete Forum and Search --> : check what button was pressed
gmiadlicha
04-13-2003, 05:33 AM
Hy everybody!
I only have one question about variables to all of you:
OK, I have two buttons and after one of them was pressed, an animation where something happens(still the same,no dificulty if 1 or 2 was pressed), than the movie stops and another movie should load,here it should be checked if button 1 or 2 was pressed and movie 1 or 2 should load.
PLEASE HELP ME and write me exactly what i have got to do, what scripts and what ever because i'm new to variables.
The whole problem is in attachement(-;
Greetings, gmiadlicha :rolleyes:
blanius
04-13-2003, 04:17 PM
In your start script put something to set up your variable like:
myvar=0;
then in button 1 up action put
myvar=1;
in button 2 up action put
myvar=2;
Then later when your first animation is over you jusct check the value of myvar
blanius
04-14-2003, 09:25 AM
Originally posted by gmiadlicha
PLEASE HELP ME and write me exactly what i have got to do, what scripts and what ever because i'm new to variables.
:
To do that would be a disservice to you.
Based on your description you could add a scene to the end of the first movie that has one script action that checks the myvar.
something like
if (myvar==1){
loadMovie("movieone.swf");
}else{
loadMovie("movietwo.swf");
}
gmiadlicha
04-14-2003, 09:40 AM
I only have one last question: I must make this now with 4 buttons and 4 movies, OK the scripts with the buttons are the same, but how do i construct such a script(if else) for 4 movies????????
greetings gmiadlicha
PS:Wishing you all happy eastern!!!!!!
blanius
04-14-2003, 02:04 PM
Originally posted by gmiadlicha
I only have one last question: I must make this now with 4 buttons and 4 movies, OK the scripts with the buttons are the same, but how do i construct such a script(if else) for 4 movies????????
greetings gmiadlicha
PS:Wishing you all happy eastern!!!!!!
if (myvar==1){
whatever
}
elseif (myvar==2){
whatever
}
elseif (myvar==3){
}
else {
whatever
}
and so on
Or you can use Switch Case. See the online help under conditionals.
DmanPfeif
04-14-2003, 10:02 PM
I don't really understand what you mean. If you could clarify it for me i might be able to make it for you.
Dan :cow: :cow: :cow:
:doughnut: :rolleyes:
gmiadlicha
04-15-2003, 04:47 AM
Hy Dan!
It's real simple:
1.)I have four buttons
2.)If you press one of them, then starts an animation(the animation is still the same after all buttons), then a keyframe->stop movie and load movie(1,2,3 or 4)
3.)So the animation after the buttons are pressed are the same, so i want to reduce filesice->
Keyframe 1 ->The four buttons->movie stops if you press one button->goto
Keyframe 2 - the animation
Keyframe 3 - The movie stops and now the correct movie should load(If buztton one was pressed->movie 1, if button 2 was pressed->movie 2, and so on)
greetings gmiadlicha
gmiadlicha
04-23-2003, 01:58 PM
Hy everybody!
Please help me because i even have not cleared my problem with my check-what-button-pressed scripts and i have real no backround in using scripts!!!!!!!!!!!
Here is the movie how it finally is.
greetings gmiadlicha :( :(
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.