There's no way to control the mouse cursor position.
Flex does not use startDrag and handles its own dragging so it can handle the mouse up outside the stage. See the code in Panel.as ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of jmfillman Sent: Tuesday, March 11, 2008 9:07 AM To: [email protected] Subject: [flexcoders] Re: Drag Boundaries Excellent!! That resolves limiting the dragged item to the rectangle, however, the mouse still can leave the drag area. If the mouse button is released outside of the rectangle, the mouse_move and mouse_up events does not fire (as expected), and you can be left with a floating item, in this case, a button. So, can I keep the mouse within the same rectangle, only while dragging? --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "iilsley" <[EMAIL PROTECTED]> wrote: > > > The 2nd argument to startDrag is of type 'Rectangle' . > > try: > var r:Rectangle = new Rectangle (10,0,myCanvas.width,myCanvas.height); > event.target.startDrag(false, r); > > > --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "jmfillman" <jmfillman@> wrote: > > > > Well that's what I thought, but when I change this: > > > > event.target.startDrag(); > > > > to this: > > > > event.target.startDrag(false, 10, 0, myCanvas.width, myCanvas.height); > > > > I get the following error: > > > > ArgumentError: Error #1063: Argument count mismatch on > > flash.display::Sprite/startDrag(). Expected 0, got 5. > > > > > > --------- > > > startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void >

