Page 1 of 1

Rotate objects

Posted: Wed Mar 24, 2010 4:58 pm
by tal
Hi,

I want to rotate a group, so I tried to rotate the controls of the group with a repeat loop but the command

Code: Select all

  revRotatePoly the long id of control i of grp d",45
But it is written that rotatepoly only rotates lines, curves, or polygones. SO if I have a rectangle I cant rotate it.
Is there not another command which can rotate anything?

Thanks

Re: Rotate objects

Posted: Wed Mar 24, 2010 5:13 pm
by FourthWorld
A rectangle is a four-sided polygon. Just make change the style of the graphic from rectangle to polygon and then you can use the revRotatePoly command.

Re: Rotate objects

Posted: Wed Mar 31, 2010 9:27 am
by tal
Thanks, but there is not a library or a function which could allow to rotate anything?
Maybe someone has already improved the rotate function?

Tal

Re: Rotate objects

Posted: Tue Aug 28, 2012 11:31 am
by Surbhit29
HI Tal,
I am new to Livecode programming, can you please tell how were you able to rotate a group. I am working on it but cannot find the right command.
I tried using revRotatePoly

Code: Select all

revRotatePly the long id of group "group 22", 45
But it didn't work.

Re: Rotate objects

Posted: Tue Aug 28, 2012 12:29 pm
by Klaus
Hi,

you cannot rotate a group, and of course not with the "rotatePOLY" command, where POLY stands for "polygon" (graphic). 8)
The dictiorany leaves no coubt about this!

You can rotate "polygons" by setting their startangle and rotate images by setting their "angle" property, that's all!


Best

Klaus

Re: Rotate objects

Posted: Tue Aug 28, 2012 12:54 pm
by Surbhit29
Hi Klaus,
Thanks for the reply.
Is it possible to move different types of objects all at once?

Surbhit

Re: Rotate objects

Posted: Tue Aug 28, 2012 1:12 pm
by Klaus
Yes! Check "lockmoves" in the dictionary.

Basically you DELAY all "move" command with this property until you UNLOCK them again like this:
...
lock moves
move button 1 to 300,200 in 2 seconds
move field 2 to 0,0 in 2 seconds
## Nothing is moving yet!

unlock moves
## Now the objects are moving together...
...

Best

Klaus

Re: Rotate objects

Posted: Thu Aug 30, 2012 1:55 pm
by Surbhit29
Thanks a lot Klaus
That worked well.

Surbhit