I am getting questions from the database (just text) and then passing them to flash via flash vars. I want one question to be displayed then the user will answer (text) and click a button and then the next question will be displayed for them to answer and so on.
I am not hoping for overly specific advice but as I am very new to flash/actionscript am just looking for broad advice (or links ?) on how to approach this. Can I do it all from one frame just using actionscript ?
EDIT: I think what I am really after (assuming I am not way off track) is if all the questions should be handled at once which I guess will require some kind of loop that listens for some buttonclick event to move to the next question ….. or be ‘reloading’ the flash movie and dealing with only 1 question at a time.
Thanks for any help.
I saw your edit, here’s how I would do it:
This is no means completed code or anything (You will get an error because I didn’t write a constructor, nor the questions, and I pulled answerArray out of thin air, you also need to addChild(answerHolder) too), it’s something to get started 🙂
createAnswers() can be called again, when you have a new question – this is because the sprite that holds answerHolder is cleared.