O'Reilly logo

ActionScript Graphing Cookbook by Peter Backx, Dominic Gélineau

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Moving around the chart

Being able to move around a 3D chart is one of the more spectacular features of 3D graphing. It really shows off the advantages of using a 3D engine and it will allow your users to see the same data in many different ways.

Getting ready

We'll use the previous recipe and add mouse interaction to it. So start by making a copy of the previous recipe's code and either copy it to a different package, or give it a different name. Don't forget to change the document class.

How to do it...

We'll need to store a few bits of data to calculate the mouse movements and convert them to camera changes:

  1. We will start by adding a number of variables to the Main class:
    private var _cameraController:HoverController; private var _moving:Boolean ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required