0 Replies Latest reply on Feb 6, 2012 9:22 PM by Zcgiworks

    undefined cubeMesh.getChildAt(i) problem

    Zcgiworks

      hello,

      i am currently using away3d 3.6 and flex 4.6 for a project

       

      for(var i:int = 0; i < cubeMesh.numChildren; ++i)

      {

                  var m:Mesh = (cubeMesh.getChildAt(i) as Mesh)

                  if(m)

                  m.material = new ColorMaterial("EEEEEE");

      }

       

      i am unable to get a call to getchildat() and numchildren as  it is giving error

       

      Access of possibly undefined property numChildren through a reference with static type away3d.core.base:Object3D.

      and

      Call to a possibly undefined method getChildAt through a reference with static type away3d.core.base:Object3D.

       

      can anyone suggest a solution???