constrainRectangular and ios?

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

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
kcwvc52
Posts: 49
Joined: Sun Jun 12, 2011 9:55 pm

constrainRectangular and ios?

Post by kcwvc52 » Sun Jul 10, 2011 1:07 pm

how might i use constrainRectangular inside of ios. i just really need a push in the right direction?

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

Re: constrainRectangular and ios?

Post by malte » Sun Jul 10, 2011 7:45 pm

With AE 4 this should work out of the box. Doesn't it?

set the constrainRectangular of btn "myButton to 100,200,200,300

TouchStart / end / mouseDown / up need to be passed in the controls script though.

Hope that helps,

Malte

kcwvc52
Posts: 49
Joined: Sun Jun 12, 2011 9:55 pm

Re: constrainRectangular and ios?

Post by kcwvc52 » Mon Jul 11, 2011 5:28 am

i got it working in livecode but it will not work in the simulator. and i was under the same impression i thought i worked out of the box. what else could be the problem? when i open the stack i tell it to start using animation engine? is that the proper way to deal with it in ios?

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

Re: constrainRectangular and ios?

Post by malte » Mon Jul 11, 2011 8:45 am

A few things to check:

How did you include AE into your iOs project?
Are you sure it is present and in use? (LiveCode fails silently on start using if the stack is not present)

To check this:

make a button:

Code: Select all

 answer the stacksInUse 
If ae is listed there and it is still not working, please do make sure you are using the latest version (constraining on mobile devices has been introduced with ae 4. Any version below 4 will not work properly on iOs devices)

Best idea is to make animationEngine a substack of the stack you build your app from. To do so open the messagebox and type:

Code: Select all

set the mainStack of stack "animationEngine" to "nameOfYourStackHere"
then in your mainStack at stack level add the following script:

Code: Select all

on startUp
 -- this is important for iOs, as otherwise the engine may get confused who is the defaultstack
  start using stack "animationEngine"
end startUp
Please let me know if that worked for you.

All the best,

Malte

kcwvc52
Posts: 49
Joined: Sun Jun 12, 2011 9:55 pm

Re: constrainRectangular and ios?

Post by kcwvc52 » Mon Jul 11, 2011 1:48 pm

yea i have already done all of that. one question? when i answered stacks in use the stack that i had created didn't show up is that right? also i just ran a aemoveto and it worked? so everything seems good except for the constrain? and i am running version 4.

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

Re: constrainRectangular and ios?

Post by malte » Mon Jul 11, 2011 5:31 pm

that is rather strange. Could you send me a copy of the stack for investigation? mail: revolution@derbrill.de

All the best,

Malte

Post Reply

Return to “Animation Engine”