/ Published in: ActionScript 3

There is no buttonMode property in the DisplayObject3D class in Papervision 3D. But there is a buttonMode for the viewport. So this would be my solution to create a hand cursor on a object.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
//one solution your3dObject.addEventListener(InteractiveScene3DEvent.OBJECT_OVER, over3dObject); your3dObject.addEventListener(InteractiveScene3DEvent.OBJECT_OUT, out3dObject); //active buttonMode function over3dObject(evt:InteractiveScene3DEvent):void { this.viewport.buttonMode = true; } //disable buttonMode function out3dObject(evt:InteractiveScene3DEvent):void { this.viewport.buttonMode = false; } //solution when you are working with viewport layers var my3dObjectLayer:ViewportLayer = this.viewport.getChildLayer(my3dObject); my3dObjectLayer.buttonMode = true;
Comments
