ConstrainRectangularExit not sent

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

ConstrainRectangularExit not sent

Post by Bernard » Thu Jun 18, 2009 2:27 pm

Hi Malte,

Whilst ConstrainRectangular is working as I want, it seems the ConstrainRectangularExit message is not being sent. I have a ConstrainRectangularExit handler in my object that I drag, and after I drop it, the handler isn't triggered. If I send that message to the dragged object from the MB, then the handler responds.

Bernard

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Post by Bernard » Thu Jun 18, 2009 2:42 pm

I notice another strange behaviour.

I have commented out all script inside the field I wish to constrain. The field is draggble within the constraints set when the mouse is down.

However, it also will drag itself when the mouse is down when the cursor goes over the field. It will follow the cursor movements around within the constrained area, until I move the cursor very quickly, then the field will drop.

Surely this is not the intended behaviour?

Bernard

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Post by malte » Thu Jun 18, 2009 6:35 pm

Hi Bernard,

is the locktext of the field set to true? This would be my first thought. If the fields locktext is false, it will not receive mouseUp and thus can not end the constraining handler properly.


Hope that helps,

Malte

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Post by Bernard » Thu Jun 18, 2009 7:37 pm

You're right. It required lockText=false. Both problems now solved with that property setting.

I'd been looking at writing my own contstraint handlers and it was going badly before I remembered AE and checked to see if it catered for such a scenario.

Bravo!

Bernard

Post Reply

Return to “Animation Engine”