Flash Database Step By Step Tutorial - Part 6: Now, we create objects for polling interface. We use user interface component that you can access by windows > components on menubar.
- Right Click on second frame.
- Choose Insert Keyframe.

- Drag Text Tool to stage. This object is designed for question of polling.

- Still work with that object, Choose Dynamic Text.
- Give name "question".

- From menubar, click: Windows > Components. You will get Components panel.
- Expands User Interface.
- Drag Radio Button to stage.

- At properties, give name "myRadio".
- Then, click right at second frame again. Choose actions.
- Enter following code:
question.text = myVar.title;
a = 2;
while(myVar['choice' + a] != undefined ){
duplicateMovieClip(myRadio, 'myRadio' + a, a);
this['myRadio' + a]._y = _root.myRadio._y + (this['myRadio' + a]._height * (a - 1) * 4);
this['myRadio' + a].setLabel(myVar['choice' + a]);
this['myRadio' + a].setData(a);
this['myRadio' + a].setState(false);
this['myRadio' + a].setGroupName('radioGroup');
a++;
}
myRadio.setData(1);
myRadio.setLabel(myVar.choice1);
myRadio.setState(false);
Ok, now, you can test it. Ctr + Enter to test movie. You may get like this: