en closely
    var mlayer = layerJS.select('#layer_menu');
    document.getElementsByClassName('menubox')[0].addEventListener('click', function() {
      if (mlayer.currentFrame.name() == 'menu1') {
        mlayer.transitionTo('menu2', {
          type: 'down'
        });
      } else {
        mlayer.transitionTo('menu1', {
          type: 'up'
        });
      }
    });
    document.getElementsByClassName('close')[0].addEventListener('click', function() {
      mlayer.transitionTo('menu1', {
        type