Get Child Of ObjectContainer3d?

Software: Away3D 4.x

dubletar, Member
Posted: 27 May 2012 10:27 PM   Total Posts: 73

Hi All,

I am attempting to make a tiled plane with images I’ve made.

Before I used away3d, I used a movieClip in flash to contain the images, then as the user used the mouse, the images would scroll, and the function on the movieClip would dynamically load more images in the order they should fall.

I am attempting to do the same thing with Away3D.

If I am correct, I am supposed to use objectContainer3D to hold my images (that will lay flat on the ground) and sift through the images as the user moves across.

Problem… Im trying to get the Child of the objectContainer3D, but am unable to.

Ive searched, googled, etc, and I cannot find documentation of how to get the child of an objectContainer. Am I doing it wrong?

Any help is greatly appreciated.

   

dubletar, Member
Posted: 27 May 2012 10:42 PM   Total Posts: 73   [ # 1 ]

Just for clarification.

ObjectContainer3D_A contains (objectContainer3D_B)

objectContainer3D_B’s name is ‘objectB’.

How can I get/target objectContainer3D_B from its parent, 3D_A?

By Index and By Name?

   

dubletar, Member
Posted: 29 May 2012 12:13 PM   Total Posts: 73   [ # 2 ]

bump. Anyone?

   

dubletar, Member
Posted: 30 May 2012 06:27 PM   Total Posts: 73   [ # 3 ]

bump :( ?

   

Mark Middleton, Newbie
Posted: 30 May 2012 07:09 PM   Total Posts: 8   [ # 4 ]

You should be able to do it like this:

var child:Mesh myObjContainer.getChildAt(0) as Mesh

So, you will have to know the index of the child that you want to get using this method.

 

   

dubletar, Member
Posted: 30 May 2012 07:25 PM   Total Posts: 73   [ # 5 ]

I tried that and got an error. Ill try it again.

Can I still get the child of an object by name too?

var child:Mesh myObjContainer.getChildByName('name') as Mesh
   

Richard Olsson, Administrator
Posted: 16 June 2012 01:50 PM   Total Posts: 1192   [ # 6 ]

There is currently no method to find a child by name in Away3D. You’ll need to implement your own (by recursing the scene graph until you find it.) The following issue report tracks a feature like this, which will likely be added for Away3D 4.1:

https://github.com/away3d/away3d-core-fp11/issues/280

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X