Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 5th, 2012  |  syntax: None  |  size: 0.73 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. FLEX 4.0 Vgroup seems not to draw their elements
  2. public function nextQuestion(event:MouseEvent):void
  3. {
  4.     destroyQuestion();
  5.     selectNextQuestion();
  6.     creatQuestion();
  7.  
  8. }
  9.  
  10.  
  11. private function destroyQuestion(): void
  12. {
  13.     vgSurvey.removeAllElements();
  14. }
  15.  
  16.  
  17.  
  18. private function createQuestion(): void
  19. {  
  20.  
  21.     for each(var answer: Answer in currentItem.arrayAnswers)
  22.     {
  23.         var radioAnswer: RadioButton = new RadioButton();              
  24.  
  25.         radioAnswer.id = answer.id;            
  26.  
  27.         radioAnswer.label = answer.label;                          
  28.  
  29.         vgSurvey.addElement(radioAnswer);              
  30.  
  31.     }  
  32.  
  33. }
  34.  
  35.  
  36. <MXML>
  37.  
  38. ...
  39.  
  40.      <s:VGroup id="vgSurvey" >                                          
  41.  
  42.      </s:VGroup>