
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
14
|
Chapter 1: A Gentle Introduction for Nonprogrammers
Flash Programs
To most computer users, a program is synonymous with an application, such as
Adobe Photoshop or Macromedia Dreamweaver MX. Obviously, that’s not what
we’re building when we program in Flash. Programmers, on the other hand, define a
program as a collection of code (a series of statements), but that’s only part of what
we’re building.
A Flash movie is more than a series of lines of code. Code in Flash is intermingled
with Flash movie elements, such as frames, movie clips, graphics, and buttons. In the
end, there really isn’t such a thing as a Flash “program” in the classic sense of the
term. Instead of complete programs written in ActionScript, we have scripts: code
segments that give programmatic behavior to our movie, just as JavaScript scripts
give programmatic behavior to HTML documents. The real product we’re building is
not a program but a complete Flash movie (the exported .swf file, including its code,
timelines, visuals, sound, and other assets).
Our scripts include most of what you’d see in traditional programs, without the
operating system–level stuff you would write in languages like C++ or Java to place
graphics on the screen or cue sounds. We’re spared the need to manage the nuts and
bolts of graphics and ...