0 Replies Latest reply on Feb 5, 2014 10:03 AM by Machu Picchu Ltd

    Show/hide Nav bar on toggle of click?

    Machu Picchu Ltd

      Hi guys,

       

      I'm tying to get my nav bar (which is a symbol) to show and hide, basically play then playreverse if click again.

       

      so i have the button called menu and the nav bar animation is the symbol navBar,

       

      heres my code,

       

       

       

       

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

                sym.play('navBar');

      });

       

       

       

       

       

       

       

       

      function btnOnOff(){

                if (toggle){

                          toggle=false;

                          sym.playReverse('navBar');

       

       

                }

                else{

                                    sym.play('navBar');

                }

      }

       

       

       

       

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

                btnOnOff();

      });