Can't get debug mode to engage with constrainLinear handler

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

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
nigelBUSrqT
Posts: 14
Joined: Fri May 11, 2012 6:24 am

Can't get debug mode to engage with constrainLinear handler

Post by nigelBUSrqT » Thu Aug 30, 2012 3:19 am

Hello there

for a while, I have been running various modifications of a stack that uses AE's constrainLinearCallBack handler to run a collection of constrainLinear-based sliders.

When it is working, it is brilliant. However, there is quite a high percentage of days on which code that has worked quite adequately the day before refuses to either run (i.e. constrained objects will not drag on their prescribed tracks) or to engage with debug mode (and thereby help me find what I have done wrong with the code).

Early on, I put it down to unfamiliarity with getting the AE stack and failure to get it functioning correctly. I believe this has been largely fixed using the "if animation Engine is not among the stacksInUse" chunk of code offered in the documentation intro. More recently, there have been several days when it will not enable dragging and will not engage with debug mode (whether using graphically applied or coded breakpoints). The preceding "openCard" handler engages fine (green editing field and stepping through lines of code) but the constrainLinearCallBack handler simply returns a "No errors occurred" on the errors tab of the code editor and does not generate the green editing field. Yesterday, I thought the problem with this had been overcome because whenever the green triangle would not engage debug mode, it could be made to engage by clicking on the stack interface that I am working on and clicking on a constrained item: the editing field became green and debugging could progress. However, today, what I believe is the same code is failing to respond with this approach.

Is there a common problem with AE stacks that I may be overlooking and which should be checked for? The "use me" box on the AE inspector is checked and a simple stack that I have generated with a single graphic and monstrously simple code

Code: Select all

on constrainLinearCallBack
   set the constrainLinear of image cat1Comp1 to 100,200,300,200
end constrainLinearCallBack
is working fine

cheers

N

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

Re: Can't get debug mode to engage with constrainLinear hand

Post by malte » Thu Aug 30, 2012 8:20 pm

Hi,

constrainrectangular needs to be set at least once before the callback messages can be sent. :-) So best to initialize the property once on opencard or any other place that makes sense.

Hth,

Malte

nigelBUSrqT
Posts: 14
Joined: Fri May 11, 2012 6:24 am

Re: Can't get debug mode to engage with constrainLinear hand

Post by nigelBUSrqT » Mon Sep 03, 2012 8:15 pm

Hi Malte - sorry, have just picked your response - have been on cashflow projects since getting stuck :-)

Do you mean constrainLinear? (I don't understand why constrainrectangular would need to be set for the constrainLinearCallBack to function properly)

Assuming it is constrainLinear, to get the handler to work properly, the on openCard handler would have a "set constrainLinear of button thebutton to w,x,y,z" instruction included?

Or would I specifically use constrainLinearInit?

cheers

N

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

Re: Can't get debug mode to engage with constrainLinear hand

Post by malte » Tue Sep 04, 2012 7:23 am

Hi,

yes you need to set the constrainLinear property of the object you want to be able to drag. The init and the callback commands are only sent if the property has been set. otherwise animationEngine does not know that you want your control to receive those messages :)

Hth,

Malte

culodefori
Posts: 1
Joined: Thu Jun 20, 2013 7:50 pm

Re: Can't get debug mode to engage with constrainLinear hand

Post by culodefori » Thu Jun 20, 2013 7:51 pm

malte wrote:Hi,

constrainrectangular needs to be set at least once before the callback messages can be sent. :-) So best to initialize the property once on opencard or any other place that makes sense.

Hth,

Malte
that did the trick for me!

cheers

Post Reply

Return to “Animation Engine”