Page 1 of 1

Need actionscript to validate form for Flash

Posted: Tue Oct 24, 2006 1:00 pm
by robman
OK, I know this is simple, but I need the action script to validate a form with 4 different text areas where I can ask a question and the person has to fill in the four answers not in order but the button needs to check if all 4 answers are right or wrong.

Thanks,
Rob

Using Flash

Example: What are the 4 basic shapes?

type in:
box1>
box2>
box3>
box4>

Triangle, rectangle, circle, and square.

button: check answers. Right or Wrong

Posted: Sun Oct 29, 2006 12:55 pm
by ianhull

Code: Select all

If  (box1circle == "Circle")    {
       iscircleright == "true";
}   else   {
       iscircleright == "false";
}
You will need to setup this for every box


then do this for each

Code: Select all

If  (iscircleright == "true")    {
       count = 1
}   else   {
       iscircleright == "false";
       count = -1
}