I'm still struggling with this one... here's my class
public class Floor extends Plane
{
public function Floor(floorMc:MovieClip, segmentsW:uint=1,
segmentsH:uint=1, yUp:Boolean=true)
{
var bitmapData:BitmapData = new BitmapData(2048, 2048, true,
0x00000000);
bitmapData.draw(floorMc);
var floorMaterial:BitmapMaterial = new BitmapMaterial(bitmapData,
false);
super(floorMaterial, floorMc.width, floorMc.height, 1, 1, true);
rotationX = 90;
trace();
}
}
Firstly, I would like to create a BitmapData object the same size as
the MovieClip, but Texture3DProxy throws a "size must be power of 2"
error unless I set both height and width to a power of two, so
new BitmapData(floorMc.width, floorMc.height, true, 0x00000000)
doesn't work.
Secondly, I can't set the BitmapMaterial to transparent = true as
suggested above - because BitmapMaterial doesn't have a transparent
property.
I'm trying to do much the same thing - draw a Sprite onto a plane and
show only the opaque parts of the Sprite.
Any ideas?
Cheers,
Wag