default textures on startup at loaded .awd

Software: Away3D 4.x

Manuel L., Member
Posted: 30 March 2012 08:58 AM   Total Posts: 99

Hey guys, i have a problem ... im using away3d 4.0 and at on startup i am loading a .awd-model.
the model shows up fast but it comes with the default checked texture first and it takes up to 20 seconds until all textures do show up.
what can i do?
my tests are offline so it could not have something to do with the loading of the textures right? is the parsing so slow?
please help me with an explanation what happens here.

thank you very much

   

Avatar
Fabrice Closier, Administrator
Posted: 30 March 2012 09:57 AM   Total Posts: 1265   [ # 1 ]

If you would set assets/complete listeners, you’d know when all is loaded, then addChild. Now the model is displayed with the default texture, so it doesn’t give errors while they are loading.

   

Manuel L., Member
Posted: 30 March 2012 10:02 AM   Total Posts: 99   [ # 2 ]

thank you very much fabrice .... i have often read something about the asset complete thing, but did never get it to work. can u please explain me very short, with a code sample how i get the complete listener working? :-*

   

Manuel L., Member
Posted: 30 March 2012 11:37 AM   Total Posts: 99   [ # 3 ]

thanks fabrice ... i have found code that helped me a bit, but im not able to change the material for example ... im trying to create a loader for the materials, so i ahve to be able to get acces to every object while parsing ... why does the following not work? what am i doing wrong.

_loader.addEventListener(AssetEvent.MESH_COMPLETE, abc);

private function abc(e:AssetEvent):void
{
var tmp:ColorMaterial = new ColorMaterial(0xff0000);
var _mesh:Mesh = e.asset as Mesh;
_mesh.material = tmp;
}

and the second question is ... is it possible to use the assetevents as progressloader so that i can trace a status in percent for example?

thank you!

   

Manuel L., Member
Posted: 31 March 2012 08:06 AM   Total Posts: 99   [ # 4 ]

Hey guys, how is it possible to avoid the automatical texturing on awd load, so that i can place my materials by myself? can u tell me where i can change the code for this?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X