Hey Rob,

I still don't know what was really going on. But I used getChildByName
to get to the object and that works fine now :)
Thanks for you help! I will post more next time to make it easier for
others to solve the problem.

Wouter

On 23 nov, 04:45, "Rob Bateman" <[EMAIL PROTECTED]> wrote:
> Hey Wouter
>
> would be hard to know if the problem was related to the engine without
> seeing more code. It might be worth you checking any other variable
> assignments in your code to make sure they aren't wiping the array of
> objects. If you still see the 3d objects, but their z position is no longer
> updating, then the problem may well lie in the contents of the 2d array.
>
> atb
>
> Rob
>
> On Sat, Nov 22, 2008 at 11:05 PM, WoutervD <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Hello all,
>
> > I am using Away3D in a school project of mine (deadline wednesday,
> > yay).
> > The problem I am having is really strange.
>
> > I have an external variable from another class that I added as a child
> > to scene.
> > it's all about his line of code:
>
> > m_conveyor.getConveyor()[i][j].sprite.z=Math.round(Math.random()*30);
>
> > m_conveyor.getConveyor() returns an 2D array containing objects. These
> > objects have the property sprite which is a 3DObject. One that I have
> > added as a child to the scene.
>
> > Now in this example I would want the z position of the 3DObject to be
> > random.
> > I placed the line of code inside an onEnterFrame() so that the line of
> > code is processed each fps.
>
> > My problem:
> > Only the first random z position is visible. I placed a trace right
> > after the line of code like this:
>
> > trace(m_conveyor.getConveyor()[i][j].sprite.z)
>
> > and it outputs a random number each run. But the z position of the
> > object on my screen remains the same! Only the very first time it
> > processes the line it uses the random z position.
>
> > Now my question is... who can help me with this? I would very much
> > appreciate it. :)
>
> > Thanks in advance.
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [EMAIL PROTECTED]

Reply via email to