randomly position objects on-screen

Chris Sheffield cmsheffield at icloud.com
Fri May 31 12:49:30 CDT 2013


Okay, I figure someone out there has probably done this before, so I thought I'd ask here before I dive in to the deep end (or go off the deep end, whichever comes first).

Given a rectangular area (in this case a graphic object), I need to randomly position three controls (in this case Scott's tmControl buttons (groups)), within that area. It's not a huge area to work with, but the controls are not too big. The conditions are that the controls cannot intersect (overlap) and they have to be completely visible within the given area (not partially off-screen).

Any takers?

Thanks,
Chris


--
Chris Sheffield
Read Naturally, Inc.
www.readnaturally.com




More information about the use-livecode mailing list