1 Reply Latest reply on Mar 16, 2012 12:15 PM by kglad

    calling a variable in an instance name


      Maybe I am far off here, but I'm hoping someone can help.


      Basically I'm creating a question with 4 answers (i.e. a,b,c,d).


      I have my question working fine, but I'm having a problem adding a check mark beside the answers once the user clicks the submit button.


      I've created four instances of my check mark; rightAns1_mc, rightAns2_mc, rightAns3_mc, rightAns4_mc.  I've set them all to _invisible = false;


      I've also set up a variable; nCheck:Number = 0; and when the user clicks one the radial buttons I have the variable change (i.e. if they click A, it set to nCheck = 1; if they click B, it sets to nCheck = 2; etc)


      So in my if statement for the submit button I figured I could have rightAns(nCheck)_mc._visible = true;



      This completely breaks everything. Like I said, I'm probably far off here. If I am what should I do differently, and if I'm close what am I doing wrong?