A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Radial Spacing???

  1. #1
    Where have I been ??
    Join Date
    Oct 2001
    Posts
    305
    Okay, I know that using the Align Window (CTRL+K) You can evenly space objects on your stage with other objects, or to the stage itself. My question I have is, Is there a way to even space objects along a Curve, or around the perimeter of a circle. What I am trying to recreate is a Clocks Gearwork, and I am needing to evenly distribute the teeth of the gear around a circle, (also not just evenly spacing but also proper rotation which I could do by hand if I wanted to). Does anyone have any ideas about how to go about doing this. Any help would be greatly appreciated.

  2. #2
    the usual
    Join Date
    Jul 2000
    Posts
    1,482
    in short - no

    it may be possible with actionscript

  3. #3
    An Inconvenient Serving Size hurricaneone's Avatar
    Join Date
    Mar 2001
    Location
    You know where
    Posts
    1,918
    The method I use to space items around a curve is to set up your item, then change its center point, copy it, then rotate the item. Paste another, rotate.

    OK, it's not pretty, but it works
    Cheers

  4. #4
    desert nomad
    Join Date
    Aug 2001
    Posts
    63
    use guides. view>show rulers, and make horizontal and vertical guides by dragging from the rulers. it would be easy to space around by hitting the four ends. start out by adding a vertical and horiz. guide to make it look like a crosshair. if you want any guides to go between the lines, use a little bit of math. actually, it's not that easy. you have to use the formula for a unit circle, f(x)=+-Math.sqrt(x^2+y^2). if the quadrant you are targeting is above the horizontal guide, use positive. else use negative. the x and y coordinate you have to find will be based on the x at which you want it to stop. for example if you want the curve to be straight and then bending to the right, use f(x)=Math.sqrt(x^2+y^2) and plug in the x you want to align your symbol to. i.e. if you want your symbol to be centered at (100,50) [and keep in mind that flash inverts the y coordinate system] do this: f(x)=100^2+y^2 and solve algebraically for y. then you'll have the exact coordinates you'll need.

  5. #5
    Where have I been ??
    Join Date
    Oct 2001
    Posts
    305

    Well...

    I cheated, and found a way to do it. Though it isnt the Easiest way to go about doing it. I did figure a way.

    What I did was make 18 dupes of the MC, then set the starting rotation for each off by 20 degrees.

    Thank you all for the help.
    Final Effect:
    http://www.dmstudios.net/~DNS/CLOCK.swf
    [Edited by rru96 on 04-28-2002 at 02:36 AM]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center