Sorry, can you provide awd loading example? I'm also trying to use AS3
class exporter from Prefab, and getting error: [Fault] exception,
information=TypeError: Error #1009: Cannot access a property or method
of a null object reference.
Fault, applyMaterialToMesh() at TestPrefab.as:121
This is my sample code:
package
{
import away3dlite.containers.View3D
import away3dlite.core.base.Mesh;
import away3dlite.primitives.Cube6;
import away3dlite.cameras.Camera3D;
import flash.display.Sprite;
[SWF(width="500", height="400", frameRate="60",
backgroundColor="#FFFFFF")]
public class AwayLiteCube extends Sprite
{
public function AwayLiteCube()
{
// create a viewport
var view:View3D = new View3D();
view.x = 250;
view.y = 200;
var camera:Camera3D = new Camera3D;
camera.x = 0;
camera.y = 0;
view.camera = camera;
addChild(view);
camera.z = -300;
var mesh:TestPrefab = new TestPrefab();
view.scene.addChild(mesh);
view.render();
}
}
}
To unsubscribe from this group, send email to
away3d-dev+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.