In this particular application, the shapes are the areas between the
lines created when graphing several time series on a chart (e.g., the
price of several stocks, graphed over time)
It sounds to me like what you need is actually some kind of line of best fit
rather than a centre. The usual
Look into MovieClip.getBounds() and MovieClip.getRect(). For example,
you could use:
import flash.geom.Point;
// ...
function getCenter(shape:MovieClip):Point {
var bounds:Object = shape.getBounds(this);
var center:Point = new Point();
center.x = (bounds.xMax -
2 matches
Mail list logo