Hi Malte,
first of all thx for the awesome AE! It is really fun!
However atm I am stuck with one problem.
I created an image and set "constrainRectangular" so it is dragable.
To drag and click on it I use:
on constrainRectangularInit
on constrainRectangularCallBack
on constrainRectangularExit
So far no problem. I can drag it to places and click on it.
Now to the problem.
Once I dragged it to a defined spot I want to disallow the draggeing but still want to be able to click on it.
I tried set constrainRectangular to empty --> no dragging but also no clicking possible
I tried set opaque to false --> not effect
I tried set Locklocation--> no effect
I also tried to jump from "constrainRectangularCallBack" to "constrainRectangularExit" with messages...
At the moement I am quite lost.
I hope you can help.
Cheers, Björn
constrainRectangular
Moderators: heatherlaine, kevinmiller, robinmiller, malte
Re: constrainRectangular
Hi Björn,
as soon as the constrainRectangular is set to empt the callback messages are no longer sent. as soo as you do not want to drag the object anymore, make sure to set the constrainRectangular to empty and handle mouseDown / up instead...
on mouseUp
if the constrainRectangular of me is empty then
-- do stuff for non moving state
else
-- needs to pass, Gandalf!
pass mouseUp
end if
end mouseUp
Hope this helps,
Malte
as soon as the constrainRectangular is set to empt the callback messages are no longer sent. as soo as you do not want to drag the object anymore, make sure to set the constrainRectangular to empty and handle mouseDown / up instead...
on mouseUp
if the constrainRectangular of me is empty then
-- do stuff for non moving state
else
-- needs to pass, Gandalf!
pass mouseUp
end if
end mouseUp
Hope this helps,
Malte