0 Replies Latest reply on Apr 14, 2008 12:27 PM by arpatupuropo

    adding links to "empty  clip" menu

    arpatupuropo
      I have this menu, that auto-henerates.

      How do I include the url I want on "on click?"

      thanks

      menuholder = createEmptyMovieClip("menuholder", -1);
      menuholder._x = centerx;
      menuitems = [];
      labels = ["Animation", "Art", "Automobile", "Concept", "Consulting", "Cosm", "Coul", "Design", "Illus", "Institutionnel", "Interface", "Multimedia", "Packaging", "Print", "Proto", "Supports", "Transports", "Web"];
      miheight = 20;
      miborder = 1;
      starty = centery-((labels.length-1)*(miheight+miborder))/2;

      for (var i = 0; i<labels.length; i++) {
      var menuitem = menuholder.attachMovie("menuitem", "menu"+i, i);
      menuitem._y = starty+i*(miheight+miborder);
      menuitem.id = i;
      menuitem.label = labels ;
      menuitem.onRollOver = function() {
      _root.selected = this;
      };
      menuitems.push(menuitem);
      }
      onEnterFrame = function ()
      {
      var height = 0;
      for (var i = 0; i<labels.length; i++)
      {
      var xxm = menuitems
      ._xmouse;
      var yym = menuitems ._ymouse;
      //trace (menuitems
      .label + " xx : "+ xxm + "yy :" + yym);
      var ym = Math.sqrt(xxm*xxm+yym*yym);
      //if (ym<50) {
      if ((Math.abs(yym)<(miheight+15)) && ((xxm>-(miheight+15))&&(xxm <150))){
      ym = Math.min(ym,50);
      menuitems ._yscale = menuitems._xscale += ((200-ym)-menuitems ._xscale)/3;}
      else {
      menuitems
      ._yscale = menuitems ._xscale += (100-menuitems._xscale)/3;}
      height += menuitems .height;}
      height += (labels.length-1)*miborder;
      var ypos = Math.round(centery-height/2);
      for (var i = 0; i<labels.length; i++) {
      ypos += menuitems[i-1]._height/2+miborder+menuitems
      ._height/2;menuitems ._y = ypos;}
      };