0 Replies Latest reply on Jan 23, 2008 7:14 AM by Antony52

    Drag event for Actionscript created Panel.

    Antony52
      I have a panel and inside this panel is a tree. When I drag and drop a node from the list onto the application a panel is created in the coordinates of the mouse. Until now everything works. However how can I initiate drag and drop for the created panel since it is not in mxml and I cannot use the mouseMove property? Below is the code for the created panel. I have a dragStart function that starts the whole custom drag and drop but it works for mxml created controls. How can I do the same for actionscript ones?

      private function createFeedPanel(event:MouseEvent):void {

      var createFeed:Panel = new Panel();
      createFeed.x = event.localX;
      createFeed.y = event.localY;
      createFeed.width = 135;
      createFeed.height = 70;
      createFeed.layout = "absolute";
      createFeed.title = "Fixed Feed";
      addChild(createFeed);

      }