Place Points Around Circle Classes (379)
This is a simple Class, yet comes in handy for many projects. I’ve added a few extra parameters beyond only placing x amount of points around the circumference of a circle. This is a static Class and returns an array of points around a circle.Below are the parameters and explanations of what each parameter defines.
centerx: The center x position of the circle to place the points around.
centery: The center y position of the circle to place the points around.
radi: The radius of the circle to distribute the points around.
total: The total amount of point to distribute around the circle.
startangle: [Optional] The starting angle of the first point. This is based on the 0-360 range.
arc: [Optional] The length of distribution around the circle to evenly distribute the points. This is based on 0-360.
dir: [Optional] This determines the direction that the points will distribute around the circle.
evenDist: [Optional] If set to true, AND if you’re arc angle is less than 360, this will evently distribute the points around the circle. If set to true, the points are visually arranged in this manner POINT-SPACE-POINT-SPACE-POINT, if set to false, an extra space will be added after the last point: POINT-SPACE-POINT-SPACE-POINT-SPACE
To create the SWF above, download the Classes and set the Doc Class as the Document Class of your FLA.
4 Comments
Thank you
Just saved me some time. Works like a charm.
You’re very welcome, also thanks for the back link on your blog!
Thanks for this mate.
I was looking for a simple formula but this goes beyond the call of duty.
A good share.
This is a test comment – testing cache.