1 Reply Latest reply on Jun 2, 2011 10:47 AM by dekelev000

    startDrag() doesn't work

    dekelev000

      Hi

       

      I got this weird problem. can you check my code and see what worng please?

       

       

       

      var container:Container = new Container();

      container.x = 100;

      container.y = 100;

      container.z = 100;

       

      container.addEventListener(MouseEvent.MOUSE_DOWN, onInnerFrameMouseDown);

      container.addEventListener(MouseEvent.MOUSE_UP, onInnerFrameMouseUp);

       

       

      private function onInnerFrameMouseDown(evt:MouseEvent):void

      {

           container.startDrag();

      }

       

       

      private function onInnerFrameMouseUp(evt:MouseEvent):void

      {

           trace("Problem is here");

       

      }

       

       

      If I put a breakpoint on line: trace("Problem is here"), I see that container has an x & y value of its last position before being dragged.

      It only happens when setting container.z property.