1 Reply Latest reply on Jul 30, 2015 3:33 AM by Corrie1000

    Toggle a sliding menu

    Corrie1000 Level 1

      This is probably really simple but I'm a complete beginner....

       

      I have a menu that I'd like to slide in on pressing the menu button, then slide away when the button is pressed again.

       

      I have animated the menu to slide out (inside a symbol) so I'm hoping I can code it to play in reverse.

      (The animated menu is labelled 'menuhidden' at the start and 'menuout' at the end, with a stop function at the end)

       

      This is the code I've tried, but on pressing the button the menu symbol just keeps playing from the start:

       

      if (sym.$ == "menuout") { sym.getSymbol("burgermenu").playReverse("menuout") }

      else {

      sym.getSymbol("burgermenu").play("menuhidden") };

       

      Any help appreciated

      Thanks