3 Replies Latest reply on May 28, 2006 7:26 AM by Alexander_Fabian

    about rotating menu...

    Alexander_Fabian
      Hi!...

      I saw one excelent tutorial to create a rotating menu. This function is perfect in a .swf. Nevertheless; I have a little problem that I'll try to explain here:
      I have a main animation called "index.swf". If I load second animation (products.swf) in index.swf I can't see rotating menu.

      In my products.swf I have two codes to build rotating menu:
      In main frame:
      quote:

      stop();
      cant = 2;
      incr = (2*Math.PI)/cant;
      for (i=0; i<cant; i++) {
      _root.attachMovie("mc_ball"+i, "mc_ball"+(i+1), 100+i);
      referencia = this["mc_ball"+(i+1)];
      referencia.angulo = incr*i;
      }
      vel = .04;
      onEnterFrame = function () {
      vel = ((_xmouse-236)/236)*.04;
      };


      Previous code calls two MC's with own animations.

      In each MC's I have:

      quote:

      eje_x = 237;
      eje_y = 108.6;
      amp_x = 150;
      amp_y = 40;
      onEnterFrame = function () {
      this._x = (Math.cos(angulo)*amp_x)+eje_x;
      this._y = (Math.sin(angulo)*amp_y)+eje_y;
      this._yscale = this._xscale=(this._y-100)*.7+100;
      if ((angulo+_root.vel)>(2*Math.PI)) {
      angulo += _root.vel-(2*Math.PI);
      } else if ((angulo+_root.vel)<0) {
      angulo += _root.vel+(2*Math.PI);
      } else {
      angulo += _root.vel;
      }
      grado = int((angulo/Math.PI)*180);
      if (grado>=0 && grado<=90) {
      this.swapDepths(4000+grado);
      }
      if (grado>90 && grado<=180) {
      this.swapDepths(3000-grado);
      }
      if (grado>180 && grado<=270) {
      this.swapDepths(2000-grado);
      }
      if (grado>270) {
      this.swapDepths(1000+grado);
      }
      };


      I says that code run perfectly in the products.swf... But (always "but"), I need that products.swf running in index.swf.

      What I did?
      I change "_root." by "this." in first code. So, I can to see animation of MC's but is not possible to see rotation...

      I need modify more options?

      Thanks by your help!...