you can easily grab a mesh object (or any object3d) that is attached to a
scene by using the name property:

meshfaces.name = "myMeshFaces";

and then using the getChildByName() method on the scene. this function is
recursive, so it will step through all nested objects to find where your
mesh object is:

meshfaces = scene.getChildByName("myMeshFaces");

when using the name property, be sure to create unique names for each mesh
you want to identify!

hth

Rob


On Thu, Sep 10, 2009 at 4:45 AM, doyaydesign <[email protected]> wrote:

>
> I'm parsing xml to create 6 meshes and put them into an array. I have
> to target them like this:
>
>
> array[objcounter] = new Object;
> array[objcounter].ObjectContainer3D = new ObjectContainer3D
> (meshfaces);
> view.scene.addChild(array[objcounter].ObjectContainer3D);
>
> array[getobjid].ObjectContainer3D.dosomething;
>
>
> I'm not sure if going about this the right way (but its working), but
> I can't change the material.
> I give meshfaces a ColorWireMaterial at first but later I need to
> apply another color based on xml node with this kind of value
> "0xFFFFFF"
>
> How do I target the mesh in the array?
>
> Thanks for your support
> Jim




-- 
Rob Bateman
Flash Development & Consultancy

[email protected]
www.infiniteturtles.co.uk
www.away3d.com

Reply via email to