Link to home
Start Free TrialLog in
Avatar of J0HN
J0HN

asked on

TextField

i'm now designing a mathematic program
that allowed user to key in the answer into the textfield and if the answer is correct it'll show something(pictures) and if it's incorrect the "error message" will appear.
your answer and sample are appreciate
Avatar of coopa
coopa

I'll work up an example for you.
ASKER CERTIFIED SOLUTION
Avatar of coopa
coopa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
> if the answer is correct it'll show something(pictures)
> and if it's incorrect the "error message" will appear.

To achieve this you would just use two labels in the main timeline, both with stop actions.

then the code would look something like this:

If ("variable1" = "22")
      Go to and Stop ("correct")
Else
      Go to and Stop ("wrong")
End If
Avatar of J0HN

ASKER

how if i want the user to know how many question they answer are correct and how many are the incorrect answer ?

Avatar of J0HN

ASKER

how if i want the user to know how many question they answer are correct and how many are the incorrect answer ?

Avatar of J0HN

ASKER

how if i want the user to know how many question they answer are correct and how many are the incorrect answer ?

Avatar of J0HN

ASKER

how if i want the user to know how many question they answer are correct and how many are the incorrect answer ?

Then you do this...

Set Variable: "score" = 0

If ("variable1" = "22")
      Set Variable: "score" = score + 1
End If

If ("variable2" = "18")
      Set Variable: "score" = score + 1
End If

If ("variable3" = "82")
      Set Variable: "score" = score + 1
End If

and so on....

Avatar of J0HN

ASKER

would u mind to do the fla file for me pls?
Avatar of J0HN

ASKER

one more coopa if the user had answer 3 question and the answer all truth then the it'll show them like greeting text
like that how to do it ?