You need to apply at face level. Loop over all faces to set the new material
Fabrice On Apr 29, 2010, at 11:43 AM, am wrote: > nobody? > extrusion? > how to change the material? > > On 26 Apr., 12:32, am <[email protected]> wrote: >> still couldn“t figure out how to acces the material of an extrusion to >> change it. >> >> when i do a TextExtrude like this: >> >> var extrusion:TextExtrude = new TextExtrude(mesh, >> {subdivisionsXY:subdivisionsXY, subdivisionsZ:subdivisionsZ, >> bothsides:true}); >> >> and try to change the material: >> extrusion.material = someMaterial; >> >> nothing happens. >> whats wrong? >> >> On 24 Apr., 14:24, Fabrice3D <[email protected]> wrote: >> >>> No. If you want to change a property of the material, access and alter. >>> (MyMaterial as WireMaterial).wireColor = 0x00FF00 >>> If you want to change the material type, keep track of the mesh. >>> Mymeshes[i].material = someNewMaterial; >> >>> Sent from an iPhone without Flash >> >>> On Apr 24, 2010, at 12:46, am <[email protected]> wrote: >> >>>> thanks for your help, fabrice! >> >>>> On 23 Apr., 21:46, Fabrice3D <[email protected]> wrote: >>>>> By saving your materials before asign them, you can change their >>>>> properties by accessing them directly. >> >>>> you mean like this: >>>> var material1 = new WireColorMaterial(); >>>> mesh.material = material1; >>>> material1 = new WireColorMaterial(); >> >>>> this should change all materials of objects which have material1 >>>> assigned automatically? >> >>>>> In the 'tools' package, there a few classes using recursive code to >>>>> access the children if you want to parse a bit deeper that you >>>>> might want to look at. >> >>>> where can i find the tools package? >> >>>> -- >>>> Subscription >>>> settings:http://groups.google.com/group/away3d-dev/subscribe?hl=en
