1 Reply Latest reply on May 3, 2013 1:58 PM by elainecc

    Hiding and showing symbols like elements

    truth3 Level 1

      Hello everyone!

       

      I have a question that I thought and still hope will be simple to answer but I've been looking through the forum for a while now and haven't found anything regarding the subject.

       

      In edge animate I know you have the option to hide and show elements. For example if you have a text element called "Text1" you can hide it by....

       

      sym.$("Text1").hide();

       

      And to show it you simply write

       

      sym.$("Text1").show();

       

      However I wanted to be able to do this with symbols also. After a bit of playing around I found out that you can use edge animate's built in "Delete Symbol" code snippet to delete a symbol. For example if I have a symbol called "Test" I can delete the instance of it by writing

       

      sym.getSymbol("Test").deleteSymbol();

       

      However when I try to bring it back I am stuck. I see that edge animate has a code snippet for creating a symbol

       

      var mySymbolObject = sym.createChildSymbol("Symbol", "ParentElement1");

       

      But I honestly have no idea how it works or if this is even the code I need to "hide" and "show" symbols.  Can someone please help me out with this.

       

      Thank you!

        • 1. Re: Hiding and showing symbols like elements
          elainecc Adobe Employee

          Hi, truth-

           

          The first thing to explain here is that a symbol is merely a definition.  When you use a symbol on the stage, it's a symbol instance, which is by definition an element.  So if you have an element on the stage that's been defined from a symbol, you can treat it like any other element:

           

          sym.$("mySymbolInstanceNameInTheElementPanel").hide();

           

          Hope that clarifies things a bit for you!

           

          -Elaine