O'Reilly logo

Flash CS4 All-in-One For Dummies® by William B. Sanders, Doug Sahlin

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

Chapter 5. Harnessing the Power of ActionScript 3.0

In This Chapter

  • Creating arrays

  • Pushing data to arrays

  • Retrieving array elements with Pop

  • Sorting arrays

  • Introducing the Vector class

  • Using string identifiers in Vector elements

  • Incorporating the Vector.forEach() method

  • Starting and stopping drag operations

  • Drawing with ActionScript 3.0

  • Creating triangles with vertices and indices

Too often, we hear Web designers and developers pine for the "good old days" when ActionScript consisted of just a few lines of code spread all over the place. Well, we disagree. ActionScript 3.0 has a learning curve for people accustomed to using previous versions, but the good thing about ActionScript 3.0 is that now that it has been retooled into a standardized, more efficient form, it will be around for a while, and, even though some changes will inevitably be made in future versions, you don't have to figure out how to use it from scratch every time a new version is released and you want to sit down to make the world's greatest Flash application.

Harnessing the Power of ActionScript 3.0

In this chapter, we show you how to use grouping structures that corral more than a single element and give each one a unique value, and we tell you about arrays that have been included in several generations of ActionScript. Using arrays, you can easily have several values different types of data stored in the same place for ease of access. In addition, you see vectors, ...

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