hello, I wonder if it is possible to use the same bitmapMaterial for
more items and just change the BitmapData of this material to have
different textures.
i try to do something like that, but nothing change, I have just the
last texture, on every plane :
var vectorBitmapData:Vector.<BitmapData> = new Vector.<BitmapData>();
vectorBitmapData.push(bitmapData0, bitmapData1, bitmapData2);
var bmpMaterial:BitmapMaterial = new BitmapMaterial();
for (var i:int = 0; i < 10; i++) {
var p:Plane = new Plane();
if (bmpMaterial.bitmapData) {
bmpMaterial.bitmapData.unlock();
bmpMaterial.bitmapData = vectorBitmapData[i %
vectorBitmapData.length];
bmpMaterial.bitmapDatalock();
}else {
bmpMaterial.bitmapData = vectorBitmapData[0];
}
p.material = bmpMaterial
this.scene.addChild(p);
}
thank you for your answers