Hey,
is it possible to select a node which is located inside another (transparent) node with mouse events in Adobe Reader 9.4.0? I tried both SelectionEventHandler and MouseEventHandler. Both did not work. The hits-array is always undefined! :-(
My code:
function initSelectionEventHandler()
{
var eventHandler = new c3d().MouseEventHandler();
eventHandler.reportAllTargets = true;
eventHandler.onMouseHit = true;
eventHandler.onEvent = function(event)
{
if (event.leftButtonDown)
{
if (event.hits.length)
{
console.println(event.hits.length); // Reports e.g. "2" when clicked on the surrounding mesh
console.println(event.hits[0].target.name); // Reports "TypeError: event.hits[0] is undefined"
}
}
};
c3d().runtime.addEventHandler(eventHandler);
}
function c3d()
{
return getAnnots3D(0)[0].context3D;
}