PDA

View Full Version : help with Question and answer game in actionscript



rugbyfitz
03-21-2007, 04:27 PM
Hi there
Im trying to create a questions and answer game within flash, im a very basic users and am getting a little confused.
im at the very begining of the game and trying to develop my first question.
i have 4 dynamic text fields which are to be used for answer selection and a question box.

on selecting the answer a differnt question is to be asked next

within the action panel i am have been told to write the statement below from a friend although really would appreciate it if some could explain it to me and just check i have copied this down wrong as i believe i have.

Questionset = {}
questionset.q1 = {}
q.q1.text = "I am hoping this will show my first question"
.answer1 = ["no you have made a complete mess up",-3,"q2"]
.answer2 = ["well your close but stil a little bit wrong",-1,"q1"]
.answer3 = ["thats right",+2,"q3"]

\\the plus and - will eventually be used to add a scoring system to the game/ this is only the first question although others have been created. i am hoping that at the q1, q2, q3 refer to the next questions to be shown


i was also told to put in the following, i know this is a long shot but could anyone tell me where this should go and if its correct. i believe its to loop the question??????

for(i=0, if <questionset.length, i++)
{trace(questionset["q"+ i].text)}

i would really really appreciate anyones help
cheers
for