About object alignment in transcript...

WIlliam Griffin bill at igame3d.com
Wed Dec 3 00:26:18 CST 2003


This should not be hard at all.
You either have a list of items you want aligned, or a group, or other 
methods (like within some frame ..rect, selected objects, etc )

For a quick example lets say I have 400 graphics on a page and I want 
to align all the green ones

case "center"
put the loc of selection into locxy
repeat with x = 1 to number of graphics of stack "SampleStack"
if the backgroundColor of graphic x of stack "SampleStack" is  green 
then
set the loc of graphic x of stack "SampleStack" to locky -- center 
aligned
end if
end repeat

I'm fairly sure  you can use left, right, top, bottom, as well.
Items of a rect will also provide a point to shove other objects up 
agains.


Hope that helps (and works).

Mr Bill



More information about the use-livecode mailing list