i think you need to use Loader3D (http://away3d.com/livedocs/3.5.0_lib/ away3d/loaders/Loader3D.html) like you would a normal preloader
On Apr 29, 7:17 pm, juliancruz87 <[email protected]> wrote: > Thankssssssssss!!!!!!!!!!!!!!!!!! for your help this work so great! > > I have a New Question and maybe you can help me with this. > > I wanna know how to do a preloader, for my objects 3d, > > I want it a preloader bar until it is completely removed the object, > as seen now, I wish that were not seen so, we sent the sample is coomo > and no place to put the preloader function or make display a preloader > bar prettier than the default preload away3d > > see my example and because I say that not look good > > http://www.virtualworkcorporation.com/project/ > > Thanks again for your Help!!!!!!!!!!! > > On 29 abr, 10:06, Rich Elmes <[email protected]> wrote: > > > > > you have to change line 89 in "away3d\loaders\utils > > \MaterialLibrary.as" > > > from : _materialData.material = new > > BitmapMaterial(_materialData.textureBitmap); > > to : _materialData.material = new > > PhongBitmapMaterial(_materialData.textureBitmap); > > > this will then make all of your loaded 3DS models have phong materials > > though > > > it would be a useful option for LoaderCube if you could choose what > > type of BitmapMaterial it creates (Phong, WhiteShading or vanilla) > > > On Apr 28, 8:21 pm, juliancruz87 <[email protected]> wrote: > > > > I have this code. And this code Work it with a primitive object but > > > not in a Model 3DS. thanks for you help. > > > > private var light:DirectionalLight3D; > > > private var materialData:MaterialData; > > > private var phongMaterial:PhongBitmapMaterial; > > > private var container:ObjectContainer3D; > > > private var loader:LoaderCube; > > > private var max3ds:Max3DS; > > > private var model:ObjectContainer3D; > > > > private function initLight():void{ > > > light=new DirectionalLight3D({color:0xFFFFFF, ambient:0.25, > > > diffuse: > > > 0.75, specular:0.9}); > > > light.z=400; > > > light.x=-100 > > > light.y=-300; > > > scene.addChild(light); > > > > } > > > > loader=Max3DS.load("3ds/edificio.3ds", > > > {centerMeshes:true,ownCanvas:true,alpha:0})as LoaderCube; > > > loader.z=400; > > > loader.handle.y=-600; > > > loader.rotationX=88; > > > loader.addOnSuccess(onSuccessModel); > > > container.addChild(loader); > > > > /***here add PhongMaterial***/ > > > private function onSuccessModel(event:Event):void{ > > > model = loader.handle as ObjectContainer3D; > > > for each (materialData in model.materialLibrary){ > > > phongMaterial=new > > > PhongBitmapMaterial(materialData.textureBitmap); > > > } > > > > }
