ActionScript's beginnings can be traced to a bullet point
titled "Enhanced Interactivity" on a Flash 4 feature
planning list. Flash 3 offered a basic suite of actions to control
Flash's movie clips and buttons and provide interactivity.
However, I recall being impressed by a tic-tac-toe game, which,
although a straightforward task in most programming languages, was
difficult and time-consuming to implement using Flash 3 actions.
That was before ActionScript came into being. Today, one
doesn't blink when encountering dynamic web sites created
solely in Flash 4. And now, sites are appearing that exploit the even
more sophisticated ActionScript capabilities of Flash 5.
A key goal of ActionScript was approachability; it was vital that
ActionScript be easy to use for non-programmers. Rather than present
a blank script-editing window, we created a visual, easily
understandable interface in Flash 4 for adding interactivity to Flash
movies. The simplicity of Flash 4 ActionScript made it easy to learn
and kept the Flash Player small, a vital consideration.
The Flash Player is crafted to download quickly even over
low-bandwidth connections. The Flash team repeats the mantra,
"How much code will this add to the Player?" before
adding any feature to it. ActionScript was no exception to this rule.
The goal with ActionScript, as with every new Player feature, is
maximum bang (feature richness) for minimum bucks (Player size
increase).
We knew that users would put ActionScript to unforeseen uses, but all
the same, it was a joyous shock to see what users were able to
achieve with it. Within a month of the release of Flash 4, amazing
sites employing ActionScript were appearing on the
Web -- e-commerce sites, chat rooms, message boards, arcade games,
board games, and even Flash sites to create Flash sites. The
floodgates had been opened, bringing forth a new breed of animated,
interactive, highly graphical web content.
The requirements of approachability and minimizing Player size
remained tantamount. JavaScript is a subtle and complex language, and
we sought to expose its full power to advanced users while retaining
the ease of use of Flash 4 ActionScript. To this end, the new Flash 5
Actions panel has two modes: Normal Mode, a streamlined version of
the Flash 4 ActionScript editor, and Expert Mode, a straight-ahead
text editor for power users. To minimize Player size, sacrifices had
to be made in the ECMAScript-compatibility of ActionScript. For
example, ActionScript does not support compiling code at runtime
using eval( ) ; this feature would have required the incorporation of
the entire ActionScript compiler into the Player, resulting in an
unacceptable size increase. For the same reason, regular expression
matching is not supported. Both of these features are very useful and
demonstrate the difficult decisions the Flash team was forced to make
to balance the competing needs of Player size and features.
Throughout the development process, the Flash team received
invaluable input from the Flash user community, a vocal and tightly
knit group with formidable talents and passions. The Flash
community's guidance has played a large role in shaping the
features that go into the product. Macromedia's goal is to
produce software that fulfills the needs of its customers; it does
this by listening to customers and learning from the way they work.
Finally, Flash is an ongoing story, a living work that we will
constantly endeavor to improve to meet your needs. Flash developers
are artists of the Information Age, and the Flash team's job is
to produce the best paintbrushes and chisels possible. This book is
the first comprehensive tutorial and reference devoted entirely to
the ActionScript language. As such, it marks a key point in
ActionScript's evolution: ActionScript is now a subject
sophisticated enough to merit this excellent book, packed with
up-to-date material and leaving no feature unexplored.
Enjoy the book and enjoy Flash 5 ActionScript. We all look forward to
seeing what you come up with!