0 Replies Latest reply on Mar 20, 2009 7:14 PM by whoopicg

    Finishing menu with slider

      Hi. I've made a flash menu, with a slider. It works with vertical movement (mine is a drop down menu). In my case, it's a rectangle that goes over the buttons. Well, everything was going well, the slider was going up and down and stopping where it was supposed, with easing, along de Y axis.

      The thing is that I would like it to, if we went through de x axis with de mouse, and also when we click the button, the slider would go back to the initial position, through the Y axis. Meaning, if we stopped interacting with the menu, the slider would go back to its origin.

      In the actions layer I've used this script:
      easeSpeed = 2;

      slider_mc.onEnterFrame = function() {

      this._y += (yMove1-this._y)/easeSpeed;

      marca_btn.onPress = function() {

      yMove = marca_btn._y;

      colecções_btn.onPress = function() {

      yMove = colecções_btn._y;

      contactos_btn.onPress = function() {

      yMove = contactos_btn._y;

      newsletter_btn.onPress = function() {

      yMove = newsletter_btn._y;


      In each button I've used:
      on (rollOver) {
      slider.yMove = colecções_btn._y;

      In the slider I've used:
      onClipEvent (load) {

      yMove = _y;
      easeSpeed = 2;

      onClipEvent (enterFrame) {

      _y += (yMove-_y)/easeSpeed;


      Well, that's it.
      And thank you!