I'm trying to call the _parseLengthData function like this (based on the example you showed me). At the same time as I draw the curve, I create a data objects with the structure of Segments (a,b,c,d). I had to edit on line in the BezierPlugin _addCubicLengths function to make it accept an Object, not a Segment class type (bez:Object) in the local variable.
It runs without error but I get a NaN(s) for the returned length and lengths properties.
var xArray=[]
var yArray=[]
g.moveTo(bx[0].a, by[0].a);
for (var i:int = 0; i < bx.length; i++) {
var xobj = {a: bx.a, b: bx.b, c: bx.c, d:bx.d}
var yobj = {a: by.a, b: by.b, c: by.c, d:by.d}
xArray.push(xobj)
yArray.push(yobj)
g.curveTo(bx.b, by.b, bx.c, by.c);
}
var bzData=BezierPlugin._parseLengthData({x:xArray, y:yArray})
trace("Boing", bzData.length, bzData.lengths)