Friday, 22 June 2012

New Mouse Events for Away3D 4.0

It's about time I posted something useful. Hopefully this will be of use to budding 3D application developers everywhere :)

I've extended the Away3D Mouse3DManager and MouseEvent3D classes to accept the right click and middle click events recently added to Flash Player (Novemeber 2011, I think)

Remember to update your compiler and target Flash Player 11.2 or later. I had to do a bit of mucking about in FlashDevelop to get it working myself, which may well explain why it's not yet in the official Away3d library. Here's a really crazy, wild demo to show it works...

(Click image to open demo. Click/Scroll on ball  to see events triggered)

And here are the files...

Usage Example: