1 Reply Latest reply on Jul 3, 2006 9:00 PM by kglad

    fancy menu

    metazai
      Having only done basic actionscript, I'm trying to move up in the world, and I'm having difficulty. With every other internet techology I've taught myself, I start by deciding what I want, then figuring out how to achieve it, but for some reason I'm on a serious mental block here. Can someone get me jumpstarted?

      I need a menu with 7 graphical items:

      1 2 3 4 5 6 7

      where the item to the farthest left is largest in physical size. if someone clicks on, say, "5" in this example, 5 will scroll to the left, getting larger as it does so. As it scrolls to the left, 1,2,3 and 4 with drop off one at a time reappearing instantaneously in small size on the right of the menu. So, after someone has clicked "5" the menu will look like this:

      5 6 7 1 2 3 4


      Can't get my head around where to start this, or how. Any thoughts, ideas, or questions?

      Thanks for reading this message.
        • 1. Re: fancy menu
          kglad Adobe Community Professional & MVP
          use a variable to store the _x of your left-most menu item (or left-most _x). use a variable to store a reference to your right-most movieclip. and you'll probably want to use variables for the usual things like the space between menu items, the speed of the shift, the maximum _xscale and _yscale and the speed of scaling.

          then on pressing a menu item initiate a loop that starts shifting all your menu items to the left. continue this loop if your pressed menu item has _x property greater than the left-most _x. meanwhile, if any menu item is to the left of your left-most _x, move it to the right of the right-most menu item (and update your right-most menu item).

          also, in this loop scale your menu items up or down depending upon whether they are the pressed menu item (and still need to be up-scaled) or any other menu item (and still need to be down-scaled).

          stop the loop when the _x updates and scaling are completed.