Hello,
how can i add an eventlistener to a loaded awe object in away3d 4 ?
private function onResourceComplete(ev:LoaderEvent):void
{
_loader.removeEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
_loader.removeEventListener(LoaderEvent.LOAD_ERROR, onLoadError);
_myObjectContainer = new ObjectContainer3D();
_myObjectContainer = _loader as ObjectContainer3D;
_loader.addEventListener(MouseEvent3D.CLICK,onMouseClick) // Not working
_myCube = new Sphere(new ColorMaterial(0xff0000),100,100,100);
_myCube.mouseEnabled = true;
_myCube.addEventListener(MouseEvent3D.CLICK,onMouseClick);
_view.scene.addChild(_myObjectContainer);
}
For my Sphere Mouseclick is working but not for my imported object.
How to do it ? I cant mouseenable a ObjectContainer3D ?
Cheers