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...
Mouse3DManager.as
MouseEvent3D.as
Usage Example:
ExtraMouseEvents.as
Enjoy!
6 comments:
Thank You so much! :D This is just I'm waiting for in Away3D 4 Gold release. But this classes means to much time saving
Glad to be of service :O)
Remember to check your users have at least FP 11.2 installed.
Hi, the events dispath when I click and move
mouse near the sphere, not on it.
Is it possible to handle interactions more exact?
(I'm using FP 12.4)
AFAIK, we're only up to FP 11.5
The MouseOut will naturally trigger outside the sphere, otherwise this works as expected for me.
What browser are you using?
hi,
after playing around with it i think the mouseOut3d triggered a lot / or looped.
http://pastebin.com/bsUYhFii
thanks,
kakarlus
ieaiaio (catchy name), I see what you mean! There's been a few updates to Away3D's mouseEvent system since this was made, though mysteriously no right or middle button events.
Post a Comment