Papervision 3D Programming Tutorial - Mouse Selection
Learn how to highlight the Papervision object under the mouse pointer with this sample application. Demo and source code included.
VIEW THE DEMO
DOWNLOAD THE CODE
In the Photo Slide application I showed you how to add interactivity to a Papervision 3D application. Two classes were created to allow objects to respond to mouse click events: PickableObjectManager and PickableObject. PickableObjectManager was responsible for feeding the mouse coordinates into the Papervision Viewport hitTestPoint2D function, and then determining if any PickableObject had indeed been clicked on. The PickableObject class in turn simply received these events and expose appropriate functions to extending classes.
In the Photo Slide application the PickableObjectManager class (and therefore the PickableObject class) could only respond to a mouse click. In this sample application I have extended the PickableObjectManager class to allow it to determine if a PickableObject is under the mouse pointer as well as being able to detect if a PickableObject was clicked on. I have used this extended functionality to highlight the photo under the mouse pointer with a standard Flash GlowEffect.
Go back to Papervision Tutorials

Check out these other Papervision examples:
-
Papervision 3D Programming Tutorial - Creating a Papervision Component
| By mcasperson | in Programming
See how Papervision can be packaged into a SWC Flash component, which allows you to drag and drop Papervision into ...
-
Papervision 3D Programming Tutorial - Traer Physics
| By mcasperson | in Programming
See how to implement cloth physics in Papervision 3D. Demo and source code included....
-
Papervision 3D Programming Tutorial - 3D Image Transitions
| By mcasperson | in Programming
Implement 3D image transitions with this Papervision demo . Source code and online example included....
-
Papervision 3D Programming Tutorial - Environment Mapping
| By mcasperson | in Programming
Learn how to implement environment mapping with Papervision....
-
Papervision 3D Programming Tutorial - Terrain
| By mcasperson | in Programming
Learn how to create a realistic looking terrain mesh and texture that can be imported into Papervision. Demo and so...
-
How to Create a Search Feature with PHP and MySQL | By Junedseo | in Programming
Developing a robust, interactive and engaging Web site involves many different avenues, such as interactive pop-out...
-
What Is Hacking? | By faris_jayz | in Programming
It is not that difficult to hack into a computer system. The most popular definition for hacking is the act of obta...
-
How do I enable JavaScript in browser? | By myjobs | in Programming
way to enable the javascript in different types of browser....
-
How to Set Up a Local Development Environment in Ubuntu | By havard | in Programming
Learn how to set up a local development environment in Ubuntu that set up your websites on the fly....
-
XA Transaction - Solution for Transaction More Than One Database | By H4d1 | in Programming
Have you ever think that it's too difficult for making database transaction in two different places (or databases) ...
-
Away3D Programming Tutorial - Environment Material | By mcasperson | in Programming
See how to use the EnviroBitmapMaterial to create a real time reflective look in Away3D. Demo and source code inclu...
-
Away3D Programming Tutorial - Primitives | By mcasperson | in Programming
See how easy it is to use the build in primitive shapes supplied with Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Mouse Interaction | By mcasperson | in Programming
Learn how to respond to mouse events in Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Effects | By mcasperson | in Programming
See how you can add the standard Flash filters to any Away3D object to easily create advanced effects. Demo and sou...
-
Away3D Programming Tutorials - Getting Started | By mcasperson | in Programming
Learn how to get started with the Away3D Flash 3D engine with this detailed, step by step tutorial. Demo and source...








No comments yet.