7 Replies Latest reply on Jan 24, 2014 12:35 PM by resdesign

    Hide a symbol

    Ky_Bridges Level 1

      help-help-help.png

       

      So I have been navigating okay with the show and hide elements

       

      .

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

       

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

       

      I get to 1.a great, Its a symbol and has animation on it. but when I want to return back to home I cant.  My main goal

      is to get back in the box (A1-A2-A3). So how do i hide a symbol when i click on the home button while im in the symbol itself?

       

      Im in -> a.1

       

      click on home

       

      hide -> a.1 (which is a symbol)

       

      return to home screen

       

      Hope I made this as clear as I can, and I appologize if I am reposting a question that has already been answered.

      I really tried looking everywhere and nothing worked.

       

      Thanks for taking the time to read this,

       

      Kyle

        • 1. Re: Hide a symbol
          Preran Adobe Employee

          Hi Kyle_bridges,

           

          Found a post on showing and hiding symbols in Edge Animate using jQuery

           

          http://forums.adobe.com/thread/1276123

           

          Thanks,

          Preran

          • 2. Re: Hide a symbol
            Ky_Bridges Level 1

            Thank you for your reply Preran!

             

            But I tried it and it did not work.

             

            my buttons are in a symbol called nav. I have a large symbol on my stage called logo and in that I have a button called mumble_bttn.

             

            when I click on the mumble_bttn it should call the hidden symbol on the stage called mumble_p.

             

            so nested in the mumble_bttn is this

             

            sym.getSymbol('logo').$('mumble_bttn').click(function(){

             

                 sym.getComposition().getStage().$('mumble_p').show();

            });

             

            in my nav system one of the buttons is a heart, In that bttn I have this

             

            sym.getSymbol('nav').$('heart_bttn').click(function(){

             

                 sym.getComposition().getStage().$('mumble_p').hide();

            });

             

            both are not working. I might be too bad at coding, should I just do group divs?

            • 3. Re: Hide a symbol
              resdesign Adobe Community Professional & MVP

              Hey Kyle,

               

              Can you post a link to your files here or PM it to me so I can check where your problem is?

              • 4. Re: Hide a symbol
                Ky_Bridges Level 1

                I pm the file to you! Thank you

                • 5. Re: Hide a symbol
                  resdesign Adobe Community Professional & MVP

                  Hey Kyle,

                  1- you use the wrong code in the heart button

                  2- I moved code to stage/compostionReady

                  3- I used mouseenter and mouseleave instead

                  4- you have to make use to have the right scope for your symbols to address each others.

                   

                  Should work now. Let me know if you need anything else.

                  • 6. Re: Hide a symbol
                    Ky_Bridges Level 1

                    Here is the code that resdesign did for me, In case anyone gets stuck on what I did.

                    Resdesign has a good practice to put all the code in Composition ready, which is a great idea!

                     

                    Add the following in stage/compositionReady:

                    sym.getSymbol('nav').$('heart_bttn').click(function(){

                       sym.getSymbol('logo').$('mumble_p').hide();

                       sym.getSymbol('nav').$("me_page2").hide();

                              sym.getSymbol('nav').$("contact_page2").hide();

                              sym.getSymbol('nav').$("process_page2").hide();

                    });

                     

                     

                    sym.getSymbol('nav').$('heart_bttn').mouseleave(function(){

                    //on mouseover-mouseout pages

                              sym.getSymbol('nav').$("me_page").hide();

                              sym.getSymbol('nav').$("contact_page").hide();

                              sym.getSymbol('nav').$("process_page").hide();

                    });

                     

                     

                     

                     

                    sym.getSymbol('nav').$('heart_bttn').mouseenter(function(){

                              sym.getSymbol('nav').$("me_page").show();

                              sym.getSymbol('nav').$("contact_page").show();

                              sym.getSymbol('nav').$("process_page").show();

                              sym.getSymbol('logo').$('mumble_p').hide();

                    });

                     

                    Thank you again resdesign!

                     

                    Kyle

                    1 person found this helpful
                    • 7. Re: Hide a symbol
                      resdesign Adobe Community Professional & MVP

                      I guess it is a matter of preference, but I get less errors that way for some reason. Again, one of the things to look for is errors in scope for your symbols.