Hi,
Have you looked into extending the BitmapMaterial class? Just create a
custom class that extends BitmapMaterial and add a public variable to
it that holds it's assigned side:
...
myCustomBitmapMaterial:MyCustomBitmapMaterialClass = new
MyCustomBitmapMaterialClass(Cast.bitmap(new hal()));
myCustomBitmapMaterial.cubeSide = CubeFaces.FRONT;
...
Then in your event handler:
private function click(e:MouseEvent3D):void
{
trace( (e.material as MyCustomBitmapMaterialClass).cubeSide );
}
It's usually better to extend a Class first and only if necessary
modify the API's one.
ath,
Jerome.