Summary

Away3D allows you to respond to mouse events on 3D objects using a number of familiar events like MOUSE_UP, MOUSE_DOWN, MOUSE_OVER, MOUSE_OUT, ROLL_OVER, and ROLL_OUT. Functions can be registered to be called in response to these events using the standard addEventListener() function, just as you would do when responding to mouse input in a traditional 2D Flash application, or using one of the shorthand functions that are provided by the Object3D class.

A sample application was presented that demonstrated the subtle distinction between the MOUSE_OVER / MOUSE_OUT and ROLL_OVER / ROLL_OUT events.

Finally, we created an application that demonstrated how to listen for and respond to a number of mouse events. The application also determined the position of the mouse cursor on a plane within the 3D scene, which allowed us to drag-and-drop 3D objects using the mouse.

In the next chapter, we will look at the sprite classes that are available in Away3D, which can be used to create some interesting effects that are not possible with more complex 3D objects.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset