There is an auto JPG texture file on a md2 model,and then ,i wanna change it to a PNG file with alpha channel,code look like this:
........
var mesh:Mesh;
if (event.asset.assetType == AssetType.MESH)
{
if(this.somethingName==“something”)
{
mesh=Mesh(event.asset);
var bm:BitmapMaterial=new BitmapMaterial(new SomePic().bitmapData);
bm.diffuseMethod.alphaThreshold=0.5;
mesh.material=bm;
}
}
........
there is the error info: