Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with buttons for a quiz page...

Status
Not open for further replies.

sharareh12

Technical User
Joined
Apr 18, 2007
Messages
2
Location
GB
Hi,
I am trying to create a quiz for a learning CD Im doing using flash. I have provided 3 options for the user to click, with one being the right answer, however when i click the wrong answer, the text saying "right" comes up. additionally, i have a "get question" button which retrieves the next question for the user..the problem is when the next question is displayed, the "right" or "wrong" text from the previous question is still there and when an answer is clicked for the 2nd q the remaining "right/wrong" option comes up. so basically it doesnt work..this is code behind the buttons..

on (release) {
if (Number(ca) == 1) {
gotoAndPlay ("right");
} else {
gotoAndPlay ("wrong");
}
}

i have the same thing on each of the option buttons...i know its difficult to understand but i would appreciate any help i can get...

S

 
So your three buttons all have the same script above - then they all do the same thing, i.e. if your variable "ca" is "1" or 1 the play-head goes to the frame "right".

Kenneth Kawamoto
 
Sorry, i should have mentioned, each button has a different number..so a =1, b=2, c=3 but once you click on them they should display correctly whether the answer is right or wrong
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top