• Status: Solved
• Priority: Medium
• Security: Public
• Views: 261

# 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.
0
J0HN
• 6
• 5
1 Solution

Commented:
I'll work up an example for you.
0

Commented:

All i did was use a simple IF...THEN statement to determine whether the number entered was the value expected.

Compiled:
http://www.coopa.demon.co.uk/ee/math.swf

Source:
http://www.coopa.demon.co.uk/ee/math.fla

Let me know if you need any help understanding it.
0

Commented:
> 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
0

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

0

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

0

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

0

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

0

Commented:
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....

0

Author Commented:
would u mind to do the fla file for me pls?
0

Author Commented:
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 ?
0

Commented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.