更换外部加载的DAE模型上的材质贴图
fur3 (2009-12-08 11:44:08)
matList = new MaterialsList();
mat1 = new BitmapFileMaterial('1_1.jpg');
mat2 = new BitmapFileMaterial('2_1.jpg');
matList.addMaterial(mat1);
matList.addMaterial(mat2);
_dae.load("mx.dae",matList);
stage.addEventListener(MouseEvent.CLICK,loadBitmap);
private function loadBitmap(e:MouseEvent):void
{
ld = new Loader();
ld.contentLoaderInfo.addEventListener(Event.COMPLETE , loadComplete)
ld.load(new URLRequest("2_2.jpg"));
}
private function loadComplete(e:Event):void
{
mat1.bitmap = Bitmap( ld.content).bitmapData;
}
怎么点击stage换不起贴图了,只帖一张图 就完全可以,