Hi Blue
I've tried your code, and it's working now.
// these are your previous codes
var car:ferrari = new ferrari();
car.material = new BitmapMaterial((new bmpMat() as Bitmap).bitmapData,
{ smooth:true } );
The problem is you set a material to an ObjectContainer3D, because
ferrari is an ObjectContainer3D.
solution :
// set material to the body of your ferari
(car.getChildByName("body") as Mesh).material = new
BitmapMaterial((new bmpMat() as Bitmap).bitmapData, { smooth:true } );
or if all children in ferari use the same material:
var mymaterial:BitmapMaterial = new BitmapMaterial((new bmpMat() as
Bitmap).bitmapData, { smooth:true } );
for each (var m:Mesh in car.children)
{
if (m == null) continue;
m.material = mymaterial;
}
On Sep 12, 2:18 am, blue <[email protected]> wrote:
> I have uploaded the fileshttp://www.mediafire.com/?u1zxdnphj3kp4d4
> can someone please take a look?