Hi!
I had the same problem changing a single mesh of an imported object. I did it in this way:
...
public class object extends Sprite
{
// embed your 3D-Object in the swf file
[Embed(source=“thing.awd”, mimeType=“application/octet-stream”)]
private var importObject : Class;
....
// function to load the awd object
private function objectLoad() : void
{
Parsers.enableAllBundled();
AssetLibrary.addEventListener(AssetEvent.ASSET_COMPLETE,
onAssetComplete);
AssetLibrary.loadData(new importObject() );
}
// asking if loading is complete
private function onAssetComplete(ev:AssetEvent) : void
{
removeEventListener(AssetEvent.ASSET_COMPLETE,
onAssetComplete);
object = ev.asset as Mesh;
object.scale(1);
my_view.scene.addChild(object);
}
There are different possibilities loading objects. But if you want to call a single mesh you should use AWD format.
So - if you want your hill transparent means you have to change its alpha value. You can do it in this way like I did it:
private function changeAlpha( ae : MouseEvent3D) : void
{
removeEventListener(MouseEvent3D.MOUSE_DOWN, changeAlpha);
// the name you gave the object in your 3D graphics software
// will be used within away3d
var ch_alpha:Mesh = AssetLibrary.getAsset(“right_hill”) as Mesh;
if(change_alpha_value == false)
{
change_alpha_value = true;
ColorMaterial(ch_alpha.material).alpha = 0.1;
}
else
{
change_alpha_value = false;
ColorMaterial(ch_alpha.material).alpha = 1;
}
}
I hope this helps a little bit