One of the cool new features introduced in the recent Flash Player 11.2 release is the ability to lock the mouse when in fullscreen mode. What this allows is a sort of ‘infinite scroll’ effect where the mouse movement directly controls the application, rather than having to rely on the mouse cursor position.
To demonstrate this I’ve added a mouselock feature to a new Away3D demo that allows you to fly around a 3D globe using the traditional click n’ drag approach. If you enter fullscreen by hitting the spacebar, you switch into being able to control the rotation of the camera simply by moving the mouse, which I’m sure you’ll agree is a much more enjoyable experience and frees up mouse clicks for whatever else your application might require.
Of course, the construction of this demo has been about more than just mouselock. I wanted to create a convincing globe simulation using real data and so searched through as many online resources as I could find. The best resource that eventually turned up was from a fantastic NASA archive called Visible Earth. The Blue Marble category is where most of the earth textures come from, although some tweaking was necessary in Photoshop to achieve a slightly more realistic end result.
When creating an earth simulation, a lot of enjoyment seems to come from rendering the perfect sunset from space. This has many nuances such as Fresnel refraction from the water surface, a band of light forming along the horizon due to atmospheric aberration, visible relief of mountain ranges, artificial lighting from towns and cities on the ground… the list goes on and on. In achieving some of these effects I’ve actually added a few new features to the Away3D material classes, which will soon be available for use on our dev branch – check them out if you’re interested.
Because of the wide range of rendering approaches that have ended up being covered by this little experiment, I’ve decided to include a step-by-step walkthrough of the construction process – a little look behind the tricks techniques used here, as part of my upcoming Away3D training session at BTPlay. The conference is now only a couple of weeks away and something I’m really looking forward to as it will be my first Away3D training session for over a year. So much has happened since then, its sometimes hard to remember what life was like before Stage3D…
If you’re interested in finding out more on mouselock, you can learn how to implement this and other new 11.2 features over at Tom Krcha’s blog in the following article: http://www.flashrealtime.com/mouselock-right-click-middle-click-in-flash-player-11-2/