Hi there, frustration time again, I can load an OBJ easy enough in the broomstick build, but need to get it running in 3.6 until flashplayer 11 is rolled out officially at the moment I have this in away3d 4:
private function loadBlock() : void
{
trace ("loading block")
//away3d 4
blockLoader = new Loader3D;
Loader3D.enableParser(OBJParser);
blockLoader.load(new URLRequest("models/2x4/2x4.obj"));
//blockLoader.load(new URLRequest("models/arrow/arrow.obj"));
blockLoader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, blockComplete);
view.scene.addChild(blockLoader);
}
and then
private function blockComplete(event : LoaderEvent) : void
{
var mesh : Mesh;
for (var i : int = 0; i < blockLoader.numChildren; ++i)
{
mesh = Mesh(blockLoader.getChildAt(i));
mesh.geometry.scale(100);
//mesh.y = -700
//_loader.x = 300
//_loader.z = -500
var blockMaterials : DefaultMaterialBase = new ColorMaterial(0xff0000);
blockMaterials.ambientColor = 0x111111;
blockMaterials.gloss = 1;
blockMaterials.specular = .8;
blockMaterials.lights = [_light];
mesh.material.lights = [_light];
mesh.material = blockMaterials
}
}
I’m wondering if anyone has a tutorial that does the same thing in away3d 3.6 ?
Thanks in advance..