Hi,
some of the embedded bitmap textures of my 3d objects (away3d 3.6 classes exported from Prefab) are visible only sometimes, others don’t show at all when compiled to an swf.
My project: http://www.perfectblue.de/away3d/
With the select boxes to the left you can configure the different sizes
and roof forms.
In Prefab the texture shows right and there is no error in Flash CS4 during the compilation process. What am I doing wrong? Is it a timeout problem because the scene is to complex? All the different parts are created right at the beginning and hidden, if not needed.
I tried to apply a new bitmap material to the mesh of one part:
public function loadNewMaterial(matURL:String):void {
loader = new Loader();
var urlRequest:URLRequest = new URLRequest(matURL);
loader.load(urlRequest);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, applyNewMaterial);
}
private function applyNewMaterial(e:Event):void {
loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, applyNewMaterial);
for(var i:int;i<meshes.length;++i){
if(meshes[i].name == "pfosten"){
meshes[i].material = new BitmapMaterial((e.target.content as Bitmap).bitmapData);
}
}
}
Firebug shows that it is loaded. But it doesn’t show, too.
Thanks for your help in advance.
Martin