PDA

View Full Version : Creating a network diagram



Bloviator
May 19th, 2009, 11:49 AM
I am working on creating a network diagram. I used the "Creating Connected Lines" tutorial to start off. I need to place the object equal distance from each other around a center object so they don't overlap. Is there a way to set the distance or maybe the line length so they don't end up on top of each other?

Thanks

dmennenoh
May 19th, 2009, 12:45 PM
I am working on creating a network diagram. I used the "Creating Connected Lines" tutorial to start off. I need to place the object equal distance from each other around a center object so they don't overlap. Is there a way to set the distance or maybe the line length so they don't end up on top of each other?

Thanks


A circle formula should be what you need. Something like so:


function getPoint(circleX:Number, circleY:Number, radius:Number, angle:Number):Point
{
var px = circleX + radius * Math.cos(angle);
var py = circleY + radius * Math.sin(angle);
return new Point(px, py);
}

Bloviator
May 20th, 2009, 05:52 PM
A circle formula should be what you need. Something like so:


function getPoint(circleX:Number, circleY:Number, radius:Number, angle:Number):Point
{
var px = circleX + radius * Math.cos(angle);
var py = circleY + radius * Math.sin(angle);
return new Point(px, py);
}

Will this work in AS2? Is there an AS2 friendly version of this? I'm just a designer so use small words.