Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Not understanding createChildSymbol

$
0
0

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


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>