Posted: Mon Oct 06, 2008 1:09 pm
Hi Mark,
if you set the constrainRectangular property of an object, AE starts listening to mouseEvents: mouseDown, mouseUp, mouseRelease and mouseMove events in order to perform the drag. In order not to interfer with those messages and yet being able to react on the events involved, I introduced some callback messages, that are being sent to the target. This was done, because I always forget to pass messages, yet want to do something useful when a drag starts or ends, or even while a drag is being performed.
These callbacks are being sent and can be trapped in the targets script or higher up the messagepath, without passing them and thus breaking the operation:
constrainRectangularInit -> mouseDown
constrainRectangularExit -> mouseUp, mouseRelease
constrainRectangularCallback -> mouseMove (while you drag the object)
Hope that explains it.
Cheers,
Malte
if you set the constrainRectangular property of an object, AE starts listening to mouseEvents: mouseDown, mouseUp, mouseRelease and mouseMove events in order to perform the drag. In order not to interfer with those messages and yet being able to react on the events involved, I introduced some callback messages, that are being sent to the target. This was done, because I always forget to pass messages, yet want to do something useful when a drag starts or ends, or even while a drag is being performed.
These callbacks are being sent and can be trapped in the targets script or higher up the messagepath, without passing them and thus breaking the operation:
constrainRectangularInit -> mouseDown
constrainRectangularExit -> mouseUp, mouseRelease
constrainRectangularCallback -> mouseMove (while you drag the object)
Hope that explains it.
Cheers,
Malte