I'm using Flash Pro 8, and I'm trying to help some students study for a class that, I'm told, the premed students at their university take elsewhere because this professor is too hard.
What I've done so far is create a series of buttons (1-15), which when pressed displays Q1-15 in a dynamic text box (questionnumber). I'd like for them to be able to type in the corresponding answer in to the input text box (answer) and be told whether or not it was correct in a second dynamic text box (comment).
I'm having several problems, most certainly coming from my misunderstanding of probably everything.
Right now, any answer is shown as incorrect, and removing else comment = "Incorrect" gets no result.
submitbutton
Code:on (release, keyPress "<Enter>") { if ((questionnumber == "Q1") && (answer == "premaxilla")) { comment = "Correct!"; } else if ((questionnumber == "Q2") && (answer == "nasal")) { comment = "Correct!"; } else if ((questionnumber == "Q3") && (answer == "lacrimal")) { comment = "Correct!"; } else { comment = "Incorrect"; } }


Reply With Quote


Bookmarks