Hi Fabrice,
I tried
   myThing.meshes[0].material = mymaterial;
but nothing happens.  meshes.length responds with 1, so there must be
only one mesh in my AS3 file.

Do you have an example of a collada file (preferrably SketchUp
output), syntax for using the AS3Exporter command, and the resulting
AS3 file?  (It would be a great topic for a tut on your blog!)

Thank you!
Ralph

On Jul 5, 4:37 pm, Fabrice3D <[email protected]> wrote:
> if you access classholder.meshes[index]
>
> first you do not need to cast as Mesh, because only meshes are pushed  
> into this array
>
> second, you can apply as you did.
>
> classholder.meshes[index].matwrial = new Material...
>
> But you have to make sure it is the right one!
> the exporter keeps track of the original names define at the time you  
> export
>
> so you can loop over the meshes array and check on meshes[index].name
>
> I use the class all the time! There is no project i do that doesn't  
> use this class!
> and i do use exact same code if i need custom materials or changes.
>
> Fabrice
>
> On Jul 5, 2009, at 5:34 PM, Li wrote:
>
> > MMm, no sorry, no samples.
>
> > How can the material library be empty? It must somehow know what  
> > materials to apply to each mesh... Maybe you need to ask Fabrice,  
> > yes :P

Reply via email to