Hi, I'm building a very simple questionnaire in flash cs5. My timeline consists of an intro frame, three question frames and a results frame. Each of the question frames allows the users to select 1 of 5 answers choices (buttons) and then proceeds to the next question. I want to capture their button selection, store it in a variable and display it on the results page.
I placed the following actionscript below on each question frame (variable names change accordingly ie secondq, thirdq, a_second, a_third..) to capture the user's anwser. Then in the results frame, I created a text box for each anwser, made it dynamic, and set the variable name (firstq, secondq, thridq) as the value. The variables only appear in the results frame if I select the first button for each question, all other answers are not appearing in the results frame. Any help would be appreciated.
question frames:
var firstq:int = 0;
a_first.onRelease = function ()
{
firstq = 1;
gotoAndPlay(30);
};
b_first.onRelease = function ()
{
firstq = 2;
gotoAndPlay(30);
};
c_first.onRelease = function ()
{
firstq = 3;
gotoAndPlay(30);
} ;
d_first.onRelease = function ()
{
firstq = 4;
gotoAndPlay(30);
} ;
e_first.onRelease = function ()
{
firstq = 5;
gotoAndPlay(30);
} ;
results frame
stop();
trace(firstq);
trace(secondq);
trace(thirdq);
firstq = resA.text;
secondq = resB.text;
thirdq = resC.text;