[Papervision3D] How to capture events from a MXLM component in a MovieMaterial?
aboteler
aboteler at harris.com
Wed Aug 5 08:24:28 PDT 2009
Xero,
I attached the src code directory.
I traced the code for the MouseEvent.MOUSE_DOWN, note bubble only phase, and
it is being handled by the InteractiveSceneManager at the topmost level. In
the VirtualMouse.handleUpdate routine the currentTarget=BinaryNode and
dispatches the event from that object.
I added an eventListener for the BinaryNode, i.e.
"node.addEventListener(MouseEvent.MOUSE_DOWN,this.onMouseDownOnObject);",
and can see it and then I see it bubble up to the stage level listener.
Then I unsuccessfully tried two different ways to get the BinaryNode:button
event listener to be called by this event --
1. Use an event listener in the Canvas,
node.btn.addEventListener(MouseEvent.MOUSE_DOWN,this.youClicked);
2. Use an event listener in the BinaryNode component,
node.btn.addEventListener(MouseEvent.MOUSE_DOWN,node.youClicked);
Neither one was called. I might try next is to loop through each component
in the node and do a hitTest.
Thanks again for your help,
Aaron
file:
http://www.nabble.com/file/p24830420/demo.zip demo.zip
contains - BinaryViz.mxml top-node
BinaryNode.mxml interactive component I want in a
MovieMaterial
Canvas3D.as
--
View this message in context: http://www.nabble.com/How-to-capture-events-from-a-MXLM-component-in-a-MovieMaterial--tp24812045p24830420.html
Sent from the Papervision3D mailing list archive at Nabble.com.
More information about the Papervision3D
mailing list