
Untitled
By: a guest on
May 5th, 2012 | syntax:
None | size: 0.73 KB | hits: 12 | expires: Never
FLEX 4.0 Vgroup seems not to draw their elements
public function nextQuestion(event:MouseEvent):void
{
destroyQuestion();
selectNextQuestion();
creatQuestion();
}
private function destroyQuestion(): void
{
vgSurvey.removeAllElements();
}
private function createQuestion(): void
{
for each(var answer: Answer in currentItem.arrayAnswers)
{
var radioAnswer: RadioButton = new RadioButton();
radioAnswer.id = answer.id;
radioAnswer.label = answer.label;
vgSurvey.addElement(radioAnswer);
}
}
<MXML>
...
<s:VGroup id="vgSurvey" >
</s:VGroup>