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 1. Who's Afraid of the Big Bad ActionScript 3.0?

In This Chapter

  • Understanding old and new ActionScript

  • Working on the Timeline

  • Writing scripts

  • Using event listeners

  • Capturing mouse events

  • Creating functions for buttons

  • Controlling movie clips

ActionScript in Flash began as a way to control the Timeline of a Flash movie. Buttons, movie clips, and keyframes could all contain little bits of script. For example, you could assign a gotoAndStop(12) statement to a button so that when that button is pressed, the playhead would move to Frame 12 and stop. Usually, the targets of the script were keyframes where new content would appear. The downside of this method is that each button required its own script, and as application sizes grew, so too did the complexity of working with all those little scripts.

Who's Afraid of the Big Bad ActionScript 3.0?

With each new version of Flash, ActionScript improved, but nowhere near as dramatically as with ActionScript 3.0, where the language has been revised from top to bottom.

So that you can write more powerful ActionScript, Adobe modeled the latest release of ActionScript similar to other programming languages. Yes, we said the ugly word: programming. But before you run off and jump into cauldron of boiling oil as a pleasant alternative to programming, in this chapter we show what you can do with ActionScript 3.0 and (we hope!) convince you to give the latest version a try.

Vive la Différence: New ...

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