i dint considered the loader, due to the fact that it was calling the first model, so there wouldnt be problem calling a second one, but ill try it out, i think that may be the reason of the null object, i think im was too satured of code :p
Also it can help me to have model/loader by separate so i can use some properties of meshes that arent in containers (hope so XD) anyway il try and let u know tx ben. On Jul 18, 3:45 pm, ben <[email protected]> wrote: > HI, > I took a fast look it's always better to handle your parse and get > your meshes when your file (geometry and material is completely > loaded), > something like : > model1 = Collada.load(Charmesh, {scaling:1, > material:manaC}); //load is diffrent from parse , it retrun an > Object3DLoader instead of an ObjectContainer3D, > then you can had it a success event to make sure your geometry and > materials from your collada are welle loaded and parsed: > > model1.addOnSuccess(getObject); > > function getObject(e:LoaderEvent):void > { > now you are getting a > ObjectContainer3D(e.loader.handle).children are the array of > object3D contained in your loader (usefull to trace) > if you have only one object > var mesha:Mesh = (ObjectCOntainer3D(e.loader.handle).children[0] as > Mesh;//or cast as Object3D > or > var mesha:Mesh = ObjectCOntainer3D(e.loader.handle).getChildByName > ("lpmodel") as Mesh; > then your stuff... > > };
