Hey,
I created a “Tile()” containing multiple messes in Prefab3D, exported for Away3D. It extends ASBase() which extends ObjectContainer3D() in a predictable Prefab3D manner. I also exported a “PrefabProject.as” from which I’m expanding upon below.
How do I trigger a mouse over event for my new Tile() object? I’ve tried the following based on this tutorial for meshes (no errors but no results either, perhaps because it’s not a mesh!):
http://away3d.com/tutorials/Introduction_to_Mouse_Picking
...
private function initContent():void
{
_prefabOutput = new Tile();
_view.scene.addChild(_prefabOutput);
//!!!new!!!
_prefabOutput.mouseEnabled = true;
_prefabOutput.addEventListener( MouseEvent3D.MOUSE_OVER, onTileMouseOver );
_camera.lookAt(_prefabOutput.position);
}
//new function
private function onTileMouseOver( event:MouseEvent3D ):void {
trace('hi'); //sadly, no trace "hi"
event.target.onMouseOver(); //no trace "hi", so no do cool new things here
}
...
Looking at the documentation, I see that an ObjectContainer3D() does have a “mouseOver3d” event, but getting it to click in my brain isn’t happening at the moment.
http://away3d.com/livedocs/away3d/4.0/away3d/containers/ObjectContainer3D.html#event:mouseOver3d
Any thoughts on how to proceed? I truly appreciate the assistance in advance!
Best regards,
Chris