the CurveSegemt objects do require 3 Numbers3D's
compare the system to the curveTo native of flash, its also requires 3
params
k, so back to your code.
> //path definition
> var aPath:Array = [
> new Number3D(-1000, -1000, -2000),
> new Number3D(-1000, 0, 0),
> new Number3D(1000, 0, 0),
> new Number3D(1000, 1000, -2000)];
> var p:Path = new Path(aPath);
should be
> //path definition
> var aPath:Array = [
> new Number3D(-1000, -1000, -2000), --> start poit first segment
> new Number3D(-1000, 0, 0), --> directional point first segment
> new Number3D(1000, 0, 0), --> end point first segment
3 params: ok
and now things go wrong
> new Number3D(1000, 1000, -2000)];
you miss 2 points!
the second segment must first start with last point of previous one
> new Number3D(1000, 0, 0),
a directional point
> new Number3D(1000, 500, -1000);
and the last point
> new Number3D(1000, 1000, -2000)];
I have no idea what the curve must look like, but i'm sure that if you
respect the rule
of 3 params, you will get no errors, and the animation will follow
your curve
if you write a loop, the repeats of the third params for the next one,
is just a matter of saving the Number3D instance, instead
of making new ones, for your curve its not a big problem, but if your
curve are complex, you better reuse instead of creating new ones.
I hope this is the fix to your problem.
Fabrice
Fabrice