The Flash question type allows you to use a flash movie, or any other client side technology like a Java applet, as a question. All question logic is done on the client side. The flash movie can save several types of data to closedquestion:

answer
The answer field is for data that the user entered, or data that changed because of user actions.
data
The data field is for data that is different for each user, but not changing because of actions of the user. In math questions this is used to store the generated random numbers that the current user is seeing. Obviously you do not want these numbers to change for each answer attempt the user takes.
tries
The number of "tries" the user has made so far. This might not make sense for every type of interaction.
correct
Whether the current state of the users actions is considered to be a correct answer. The current state should be the data stored in the answer field, given the data stored in the data field. This field is stored, but not retrieved. On load the correctness of the state should be deducted from the loaded answer, given the loaded data.
onceCorrect
Whether the user has ever achieved a "correct" state. This field is retrieved, but not stored. The value of onceCorrect is the value of "tries" + 1, at the first time a non-zero value of "correct" is stored.

If after doing a set of interactions the state is considered to be a correct answer, then the state should still be considered to be a correct answer after leaving the question and coming back later.

Once the state is considered "correct", a post should be done with a non-zero value for the "correct" parameter. From this point on, the value of the "onceCorrect" parameter will be positive, to indicate that the student has reached a correct state at least once, even if the current state is no longer considered correct.

It is advisable to allow the student to continue exploring the interaction even after finding a correct answer. This allows the student to check feedback on possible incorrect actions and improves learning.

The page containing this question will respond to the following get/post variables: