I have made multiple mesh objects in 3DS and imported them into
Prefab. After exporting the scene to an AS3 class, I am trying to
display the objects after compiling with this:

package
{
 import away3d.containers.View3D;
 import away3d.primitives.Cube;
 import flash.display.Sprite;

 import Test2;

 [SWF(width="500", height="400", frameRate="60",
backgroundColor="#FFFFFF")]
 public class Lesson1 extends Sprite
 {
 public function Lesson1()
 {
 // create a viewport
 var view:View3D = new View3D({x:250,y:200});
 addChild(view);
 // create a sphere and put it on the 3D stage

 var holder:Test2 = new Test2();
 view.scene.addChild(holder);
 holder.scaleX = 0.3;
 holder.scaleY = 0.3;
 holder.scaleZ = 0.3;
 holder.rotationY = 100;

 // render the view
 view.render();
 }
 }

With the code above, I can see the 3D object after compiling only if
"one" single selected mesh was exported from Prefab. Hence the
lighting errors in my previous post with the 3D house, since the house
was just one single mesh.
If more than one mesh was exported from Prefab, the code above
displays nothing after compiling.


Reply via email to