1 Reply Latest reply on Mar 16, 2011 11:14 AM by paulhart83

    Adding MXML instance as child of element using actionscript

    paulhart83 Level 1



      I have been searching around and it's hard to find details on how to add an instance of an MXML file as a child of a element such as a VGroup or even a ViewStack?


      So lets assume I have a file called row.mxml and I am working in a file called table.mxml and it has a VGroup tag with id "table".


      With embeded actionscript I would like to add instances of row.mxml to the VGroup "table"






                     import views.*;



                     private function addRow():void {


                          var row:row = new row();







      <s:VGroup width="100%" height="100%" id="table" />


      @END CODE


      I've done this sort of thing using inflate in the Android Java SDK. Is this possible in flash?


      I'd prefer to have action script drive my app rather than the views, is essentally what I am going for. I dont like embeding action script into views, I'd rather just load / populate the display with AS.