i have been working with flash for about 3months now, and i have just recently been getting decent.
i need some help with some action scripting.
im trying to make a simple High Low guessing game.
i have done this before in c++, but i dont know if the setup for the if/then/else stuff is related.
basically all i want to do is
Take a players name.
Ask his/her age.
then i want to have a calculation that depending on the first letter of the name of the person, i want it to make a random number calculated. and then add their age.
then i want to have the user input their guess, then depending on the guess have something like it tell the user greater or less
and then to calculate how many times the user has guessed, then keep track of the record number of guesses.
I know that this will be alot more complicated to do in flash, but all help that is given will be appreciated.
Actualy if you did it with c++ wount have much problems in FLASH.
YOU SHOULD NOW HOW TO:
1: make input field and asign varieble name to it.
…and use it with buttun.
{you will use it in name input, and guess}
2: to randomize a number I sugest you just use:
Math.floor(Math.random()*a);
it will give you integer number.
3: … well thats it… the rest is normal use of variables…
and if then statmesnt on the gues button.
wich outputs yhe rezult to dinamic text fields, wich you reach with var names asignet to them.
something like…
on (realeas){
if (guesinput < answer){
note = "low... give me more...";
}else if(guesinput>answer) {
note = "hight. give me less..";
}else{
note = "BINGO. ";
}
quescount++;
}
guesinput - input field var
answer - var storing corect answer
note - dinamic field var
quescount - var storing ques count