I found the solution here - http://groups.google.com/group/away3d-dev/browse_thread/thread/f9c1a9487f5749f2/dc38ba29651462c5?lnk=gst&q=CubeMaterialsData+-+how+to+change+material#dc38ba29651462c5
Should the code not be updated on 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!
