3 Replies Latest reply on Nov 24, 2007 8:03 PM by peterent

    drag autoshape

    FlexPrashant Level 1
      can we drag and drop a autoshape from a canvas to another canvas .
      Mean to say i am creating a circle
      graphics.drawCircle(xPos, yPos, radius);
      can i drag and drop this circle

      One another query can we drag and drop any other control not image
      help me
        • 1. Re: drag autoshape
          peterent Level 2
          What you are asking is a fairly advanced question. You can use the DragManager to drag and drop any UIComponent. You would need to create a component, extending UIComponent in which you draw the circle. Then you detect when the component instance is being dragged by the gesture of mouse-down + mouse-move. That's when you use the DragManager to take over. The DragManager will then trigger drag events on the target object.

          You'd be best off reading up on the DragManager and practicing with some of the examples that go along with it.
          • 2. Re: drag autoshape
            FlexPrashant Level 1
            sorry i am not getting you please explain more
            • 3. Re: drag autoshape
              peterent Level 2
              The first step is to read about the DragManager and to work with the examples. There is also an Adobe Flex 2 book on the market, probably available at a local bookstore; it should also have examples. Once you are comfortable with the DragManager you'll see how to use any component class, and not just Image, as the drag proxy.