Hi guys,
Just to let you know I think trident is broken in Away3D trunk FP9 and FP10
(i've not tested the lite)
var t:Trident = new Trident();
view.scene.addChild(t);
Causes the following error on both F9 and F10 trunk versions of Away3D at
the moment (not tried it on lite).
TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at
away3d.primitives::Trident/addArrowSegments()[C:\Users\Actimel\Documents\Flex
Builder 3\TestCube01\src\away3d\primitives\Trident.as:33]
at away3d.primitives::Trident/buildTrident()[C:\Users\Actimel\Documents\Flex
Builder 3\TestCube01\src\away3d\primitives\Trident.as:59]
at away3d.primitives::Trident()[C:\Users\Actimel\Documents\Flex Builder
3\TestCube01\src\away3d\primitives\Trident.as:25]
at TestCube01/init()[C:\Users\Actimel\Documents\Flex Builder
3\TestCube01\src\TestCube01.mxml:81]
Line 33 of Trident.as is listed as:
line.end = new Vertex(b.x+x, b.y+y, b.z+z);
Have also tried the following with the same result:
var t:Trident = new Trident(500,true);
If I update function addArrowSegments(.......) in trident.as with:
Line 29: private function addArrowSegments(a:Vertex, b:Vertex,
mat:WireframeMaterial, x:Number = 0, y:Number = 0, z:Number = 0):void
{
if (a == null) { return; }
if (b == null) { return; }
var line:LineSegment = new LineSegment({material:mat});
line.start = new Vertex(a.x+x, a.y+y, a.z+z);
line.end = new Vertex(b.x+x, b.y+y, b.z+z);
addChild(line);
}
all is fine....
Vertex a and b ends up as null somewhere along the lines.
D