3 Replies Latest reply on Jun 28, 2013 3:59 AM by heathrowe

    Not understanding createChildSymbol

    Marlene Level 1

      I have a square symbol on the stage: squareHolder

      In the Library I have a symbol called: circle

       

      In document.compositionReady I have this code

           sym.mySymbol = sym.createChildSymbol('myCircle', 'squareHolder');

       

      I have a button on the stage with the following code:

           sym.$('myButton').click(function(){

              sym.$('squareHolder').children().remove();

             })

       

       

      When I click on the button, I expect the circle to disappear but the squareHolder symbol also disappears.

       

      I am not understanding where the new childSymbol called mySymbol lives. I thought it was inside the squareHolder symbol so I could access it by using

      sym.getSymbol('squareHolder').getSymbol('mySymbol')

       

      but that isn't working