1 Reply Latest reply on May 27, 2008 11:19 PM by anirudhs

    Which of MouseDown events takes priority??

    tgoodmannz Level 1

      Hi,

      I've got an AIR Flex application which is draggable (it contains a vBox:

      <mx:VBox id="mainCanvas" top="10" right="10" left="10" mouseDown="this.stage.nativeWindow.startMove()" >

      Only problem is if I want to have another draggable object embedded, that the mouseDown for the main container is taking priority over the sub-object ...

      e.g. - a chart with a draggable LineSeries within the control:

      <mx:LineSeries id="lsSell" dataProvider="{curr.dpSell}" displayName="Sell" yField="sell" xField="date" toolTip="Sell" selectable="true" mouseDown="lsSell.startDrag(false);"


      is there a way to get around this, i.e. by setting which mouseDown takes priority??

      Thanks
        • 1. Re: Which of MouseDown events takes priority??
          anirudhs Level 2
          Hi,

          You're getting the mouseDown in the parent in the bubbling phase. Just skip doing what you do in the parent if you get the event in the bubbling phase.

          Try this:

          <mx:VBox mouseDown="if ( event.eventPhase != EventPhase.BUBBLING_PHASE ) doMove()" width="100%" height="100%">
          <mx:Panel title="Test" mouseDown="trace('child ' );">

          </mx:Panel>
          </mx:VBox>