Thread: Help ASAP
View Single Post
Super Moderator
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default 05-17-2018, 03:05 PM

Originally Posted by JMoney View Post
Good Morning! I'm finished my work in regards to what I'm doing (creating an interactive trivia game); however, I want to make the game work by creating a method or function that says when the user clicks on the correct answer, the program will say "Correct Answer" and when it is the wrong answer, it will say "Incorrect Answer". I've been trying to figure it out for DAYS and I'm so tired of working on it to the point where I need some help not because I don't know how to do it, but because I need some guidance on how to get this right. Once I get the correct/incorrect method going, I can finish what I want to do by putting in directions and doing a textual storyboard. Can any of you experts help me? Thanks! All I want is directions/guidance on how to put in a method that tells Alice that when you select the correct box, the program says correct to the user and verbatim for incorrect.

- JMoney
OKay, First I changed the colors to match their labels and arranged the objects so I could see what was going on.
Next I changed the events to pass a string based on which "square" was clicked.
Then I wrote a function that compared that string to the "activeAns" string to see if it was correct.
All this seems to work OK now for one question, which I think is what you were asking for.
Attached Files
File Type: a2w finalProjv1.a2w (119.6 KB, 1 views)

Mark Henwood
Reply With Quote