# Compiling quiz

**URL:** <https://forum.kirupa.com/t/compiling-quiz/292590>\
**Category:** flash\
**Created:** [July 16, 2009, 5:39am UTC](https://forum.kirupa.com/t/compiling-quiz/292590 "2009-07-16T05:39:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilpreet](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@dilpreet](https://forum.kirupa.com/u/dilpreet)\
**Post date:** [July 16, 2009, 5:39am UTC](https://forum.kirupa.com/t/compiling-quiz/292590/1 "2009-07-16T05:39:47Z")

</div>

Hey guys

i have 4 text fields for answers for a quiz i am making. In my quiz u put in the answers and the question then compile it. So i want to know that how i can get the answers from those 4 textfield and compile them into 4 answers with radiobutons.

i have two buttons in the quiz add\_btn and compile\_btn. with the add button i add all the 4 different answers and the question to different arrays. 4 answer arrays and 1 question array. so how do i compile them and put them into a quiz like form with radiobuttons.

```php
var arrAns1:Array = new Array;
var index:int = 0;
var j:int;
var MyChoice1:Array = new Array();

MyChoice1 = new Array(arrAns1[index].length);

    for (j=0; j<arrAns1[index].length; j++) {
        MyChoice1[j] = new RadioButton();
        MyChoice1[j].label = arrAns1[index][j];
        MyChoice1[j].value = j;
        MyChoice1[j].width = questionField.width;
        MyChoice1[j].x = questionField.x + 10;
        MyChoice1[j].y = questionField.y + qHeight + (aHeight+5)*j;
        MyChoice1[j].group = rbg;
        questionHolder.addChild(MyChoice1[j]);
        }

```

Thanks
