Book Image

ActionScript Graphing Cookbook

Book Image

ActionScript Graphing Cookbook

Overview of this book

"A picture is worth a thousand words" has never been more true than when representing large sets of data. Bar charts, heat maps, cartograms, and many more have become important tools in applications and presentations to quickly give insight into complicated issues.The "ActionScript Graphing Cookbook" shows you how to add your own charts to any ActionScript program. The recipes give step-by-step instructions on how to process the input data, how to create various types of charts and how to make them interactive for even more user engagement.Starting with basic ActionScript knowledge, you will learn how to develop many different types of charts.First learn how to import your data, from Excel, web services and more. Next process the data and make it ready for graphical display. Pick one of the many graph options available as the book guides you through ActionScript's drawing functions. And when you're ready for it, branch out into 3D display.The recipes in the "ActionScript Graphing Cookbook" will gradually introduce you into the world of visualization.
Table of Contents (17 chapters)
ActionScript Graphing Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Styling the graph with different materials


Up until now, we've always used the solid color ColorMaterial to draw our graphs. However, to get the most out of your 3D world, you'll need to know TextureMaterial. This recipe introduces how to use it with a bitmap. The next chapter will show a few practical examples of the techniques learned here.

Getting ready

As in the previous recipe, start by creating a copy of the Moving around the chart recipe.

You'll also need a bitmap image. For instance, you can download open source textures that are free to use from http://opengameart.org/textures/all. There is only one requirement: the bitmap's size, both height and width, should be powers of two.

This is a limit inside Away3D that stems from the limits of the graphical card that renders the image to the screen.

How to do it...

Put the bitmap image inside the lib folder and embed it in the main application. Do this by right-clicking and selecting Generate Embed Code. Next, attach it to a class name and...