Page 1 of 1

Treating group of Objects as one Object

Posted: Mon Aug 27, 2012 2:18 pm
by Surbhit29
Hello everyone,
I have an object "Oval" which is opaque and in that Oval i have different other objects such as line, rectangle, polygon etc. Now I want is to rotate that Oval such that when it rotates all the objects that are inside that Oval change their position according to the angle of the rotation.
Its like treating all these objects as one object.
Or treating it like an image.
Can this be achieved?

Re: Treating group of Objects as one Object

Posted: Mon Aug 27, 2012 3:42 pm
by malte
Do you want to change the position only? Or do you also want to rotate the objects? If the former, this can be done, the latter is a lot more difficult.

All the best,

malte

Re: Treating group of Objects as one Object

Posted: Mon Aug 27, 2012 6:39 pm
by Surbhit29
Hi Malte,
Thnx for the reply. I just want to change the position of the objects according to the rotation.

Surbhit

Re: Treating group of Objects as one Object

Posted: Mon Aug 27, 2012 7:15 pm
by malte
rotateGroup.rev.zip
(2.97 KiB) Downloaded 715 times
This one is still rough, but should help to get you started. It rotates a group of graphics around an arbitrary point.

Cheers,

Malte

Re: Treating group of Objects as one Object

Posted: Tue Aug 28, 2012 5:33 am
by Surbhit29
Thnx for the code Malte.
But when I try to open the code it is showing the error
"Unable to open stack. Stack is corrupted. Check for backup files"

Surbhit

Re: Treating group of Objects as one Object

Posted: Tue Aug 28, 2012 5:42 am
by Surbhit29
And when I try to open it through livecode, it is showing the error "File is not a stack"

Re: Treating group of Objects as one Object

Posted: Tue Aug 28, 2012 11:22 am
by dave_probertGA6e24
Hi Surbhit -

You do realise the file is Not a livecode file, but a Zip file containing a livecode file. You need to unzip it first. Internet 101!!

Cheers,
Dave

Re: Treating group of Objects as one Object

Posted: Tue Aug 28, 2012 11:41 am
by Surbhit29
I know that already.
And after unzipping it only I have tried to open it in livecode

Re: Treating group of Objects as one Object

Posted: Tue Aug 28, 2012 12:28 pm
by Klaus
Waht versions of LiveCode are you using?

There was a change in fileformat in LiveCode 5.x , so 4.x cannot open these new stacks!
Maybe this is the problem?

Re: Treating group of Objects as one Object

Posted: Tue Aug 28, 2012 7:20 pm
by malte
It is indeed a 5.x stack. I can re upload a legacy version if necessary.

All the best,

Malte

Re: Treating group of Objects as one Object

Posted: Wed Aug 29, 2012 6:34 am
by Surbhit29
Please upload it.