But this doesn't really solve the problem. Your example just replaces one symbol instance with another. I want to remove/delete the symbol and/or the container element entirely from a button within the symbol.
Incidentally, I tried using createChildSymbol() to replace the loaded symbol with a blank one, and that didn't work either.
So by creating a container symbol named Cont1 and manually adding it to the stage then adding a child symbol from the library I was able to accomplish my goal.
Why can't I just manipulate the dynamically added symbol instance directly?
But adding a container per resdesign's sample did help.
if you had looked in the symbols you would have seen the code:
I will try to do another sample file later. You should be able to delete a symbol directly. The sample had been done to help with another particular case.
Did you try:
which you had at the beginning.
Sorry the correct syntax is:
Sorry, I did open the symbols. Guess I wasn't looking for a trigger.
Thanks. I've been trying these, and variations on them, all day and can't seem to make it work.
can you post your files?
I figured it out:
You use pass the symbol to be deleted in as the parameter for the deleteSymbol() method, like so:
Thanks, resdesign, for your help.
So glad you got it. Another step forward!