Yep, got the click of which material is clicked working, thanks. My actual
code has no variables declared within functions they are all public /
private to the class.
I didn't expect the compare to work using:
// e = MouseEvent3D
if (e.material == mat1){
trace("MAT 1 CLICKED");
}
As to changing the cubes materials after click detected, seems the only way
I can do this is to:
view.scene.removeChild(cube);
// Recreate cube with new material set and add to view.scene
D
On 13 June 2010 21:32, elguapoloco <[email protected]>wrote:
> Have you tried declaring the materials in the class (as Fabrice
> pointed out) and then compare in the click event handler?