2 Replies Latest reply on Jan 12, 2010 5:04 AM by eqing2009

    How to customize drop animation?

    eqing2009

      I dig into the flex sdk 3.2 and found the drop animation of flex drag-and-drop support is hard coded in the DragProxy class like:

       

              if (action == DragManager.NONE)
              {
                  // Tween back to original position
                  var m1:Move = new Move(this);
                  m1.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
                  m1.xFrom = x;
                  m1.yFrom = y;
                  m1.xTo = startX;
                  m1.yTo = startY;
                  m1.duration = 200;
                  m1.play();
              }
              else
              {
                  // Zoom into mouse location to show drag was accepted.
                  var e:Zoom = new Zoom(this);
                  e.zoomWidthFrom = e.zoomHeightFrom = 1.0;
                  e.zoomWidthTo = e.zoomHeightTo = 0;
                  e.duration = 200;
                  e.play();

       

                  var m:Move = new Move(this);
                  m.addEventListener(EffectEvent.EFFECT_END, effectEndHandler);
                  m.xFrom = x;
                  m.yFrom = this.y;
                  m.xTo = parent.mouseX;
                  m.yTo = parent.mouseY;
                  m.duration = 200;
                  m.play();
              }

       

      And the DragProxy class is excluded class, so , that means there is no way to customize the drop animation in flex?