Hi, The cubeMaterials property works the same way that the filters property does on regular DisplayObjects, in that you need to reset the property for the change to propagate. Just changing the materials inside the cubeMaterials (which is a CubeMaterialsData instance) will not suffice. See the below examples.
// The wrong and the right way to deal with filters myDisplayObject.filters.push(new DropShadowFilter); myDisplayObject.filters = [ new DropShadowFilter ]; // Similarly, the wrong and the right way to deal with // cubeMaterials myCube.cubeMaterials.right = new ColorMaterial(0); myCube.cubeMaterials = myModifiedCubeMaterialsData; Hope this helps! Cheers /R On Sep 13, 2:31 pm, Yağız <[email protected]> wrote: > Hi all, > > I've recently updated all Away3D project. There is a problem in Cube I > think. > > I've tried this: > cube.cubeMaterials = new CubeMaterialsData() > cube.cubeMaterials.bottom = > MaterialManager.wayEnd > cube.cubeMaterials.top = > MaterialManager.wayEnd > cube.cubeMaterials.left = > MaterialManager.wayMaterial > cube.cubeMaterials.right = > MaterialManager.wayMaterial > cube.cubeMaterials.front = > MaterialManager.wayMaterial > cube.cubeMaterials.back = > MaterialManager.wayMaterial > > It doesn't work. Then I tried this: > //cube.cubeMaterials = new CubeMaterialsData() > cube.cubeMaterials.bottom = > MaterialManager.wayEnd > cube.cubeMaterials.top = > MaterialManager.wayEnd > cube.cubeMaterials.left = > MaterialManager.wayMaterial > cube.cubeMaterials.right = > MaterialManager.wayMaterial > cube.cubeMaterials.front = > MaterialManager.wayMaterial > cube.cubeMaterials.back = > MaterialManager.wayMaterial > > It doesn't work too. Am I doing something wrong or is there really > problem? Thank you!
