Thanks for this thread!

I know its a few months old, but I had this problem as well. My project depends on being able to swap materials at runtime, and this no longer worked on Cubes after I updated. The patched class works great for altering the cubeMaterials object. It still doesn't work right when setting the materials value, but that's fine ... I was using cubeMaterials anyway.

I hope this gets rolled into the core somehow!



On Tue, 01 Jun 2010 09:17:00 -0700, colouredfunk <[email protected]> wrote:

p.s. thanks Mirko! Legend :)

On Jun 1, 5:16 pm, colouredfunk <[email protected]> wrote:
I found the solution here -http://groups.google.com/group/away3d-dev/browse_thread/thread/f9c1a9...

Should the code not beupdatedon the repository...?

On May 26, 4:53 pm, colouredfunk <[email protected]> wrote:



> Hi, since I'veupdatedby away3D repository to3.5I can no longerswapa material at runtime.

> Here is the code I'm using:

> var material:MovieMaterial = new MovieMaterial(_eCardMC);
> material.interactive = true;
> material.smooth = true;

> _painting._frame.cubeMaterials.front = material

> --- _frame is a 'Cube' and is created elsewhere:

> var cubeMat:CubeMaterialsData = new
> CubeMaterialsData({front:_image,back:bFront,top:bSides,bottom:bSides,left:leftMat,right:rightMat});
> _frame = new Cube( { width:paintingWidth , height:paintingHeight,
> depth:3, name:'cube3D', faces:cubeMat} )

> Is there a new function like redraw or something I'm missing?

> Thanks in advance!- Hide quoted text -

- Show quoted text -

Reply via email to