Foundation:
- "Flash
Basics" includes
the prerequisites that I expect every reader to
bring with him or her. Even if you consider yourself a Flash expert, you
should read this chapter as both a review and an insight into some of the
terms that I'll use throughout the book.
- "What's
New in Flash 5"
introduces you to the key features in Flash 5 that
pertain specifically to ActionScript. In addition to changes in the programming
language, features that affect how you build a Flash movie are discussed.
Finally, this chapter includes a quick rundown of previous
knowledge (that you might have acquired in older versions of Flash) that is
best forgotten.
- "The
Programmer's Approach" is a very general chapter that lays the
groundwork for your programming career. Topics such as writing specifications,
prototyping, and exactly what "good style" means are covered.
- "Basic
Programming in Flash" introduces you to the terminology and
basic elements of ActionScript, such as data types and variables. It's
impossible to discuss these elements without showing how they work, but
the goal is to simply introduce all the pieces that will be incorporated in
later chapters.
- "Programming
Structures" is a huge chapter that explains all the ways
ActionScript is structured. If Chapter 4 was the building materials (like
wood, bricks, and concrete), this chapter is the framework and architectural
styles. You also get a peek at both the Math and Number objects because
they're so integral to the structural elements covered.
- "Debugging"
offers a chance to catch your breath (after Chapter 5)
and take the time to learn ways to ensure quality programming before you
go too far in the wrong direction. The new Flash Debugger is explained, as
well as some general programming techniques to avoid or remove bugs.
- "The
Movie Clip Object"
introduces a familiar component of Flash, but in
a way that will help you understand other "objects" that come up
in later
chapters. In this way, you can leverage your existing knowledge when
learning advanced topics.
- "Functions"
shows you how to use the built-in functions as well as how to
write your own functions. It turns out that homemade functions prove to be
much more involved than the ones that come with Flash. This is possibly
the most valuable chapter because it can save you a ton of time.
- "Selecting
Text, Trapping Keys, and Manipulating Strings" looks at ways
to control text both on the screen (such as HTML text and input text) as
well as off the screen (such as cleaning up strings before the user sees
them). Also, you'll learn how to use the Key object to "trap" user
interac-tion
with the keyboard.
- "Arrays"
explores how to make, access, and manipulate arrays, which are
simply a great way to organize complex information.
- "Objects"
introduces the general form of objects, shows you how to use
the built-in objects Sound, Color, and Date, and teaches you new ways to
use the familiar Movie Clip.
- "Homemade
Objects" shows you how to apply knowledge you already
have to make complex objects in Flash. If arrays are a way to store complex
information easily, objects are a way to store really complex information.
- "Smart
Clips" walks through all the ways to build and use Smart Clips,
from ways of making standard Smart Clips work for you to creating
Custom User Interfaces (Custom UIs).
- "Interfacing
with External Data" shows you many ways Flash can "talk"
to
outside applications. Topics include reading text files, interacting with
server applications, exchanging XML-structured data, invoking and being
controlled by JavaScript, and interacting with the host applications
Authorware and Director. I didn't have time in this chapter to actually
show you how to use all these other tools, but it shows you practically
everything else.
Workshops:
- "Ensuring
That Users Have the Flash 5 Player."
This no-nonsense workshop
discusses some of the ways to make sure that your audience is
equipped to see your Flash 5 creation. We also walk through an exercise
using Flash itself as a way to determine player version.
- "Faking
Video." To answer one of the most frequent requests for Flash,
this workshop shows how to simulate video inside Flash. You'll also make
a simple slider and calculate percentages.
- "Creating
Custom Cursors."
After two simple steps to make a custom cursor,
this workshop goes on to make a Smart Clip and then a custom UI for
that Smart Clip. It's a pretty involved workshop because you learn that you
can't use buttons (even invisible ones) because they would conflict with
any buttons that you try to place this Smart Clip over.
- "Creating
a Horizontal Slider." In this workshop, we make a Smart Clip
version of a slider similar to the one built in the "Faking Video"
workshop.
As a Smart Clip, we make this as generic and universal as possible.
- "Building
a Slide Show." In addition to the slide show application that you
build, you get your first introduction to using the enterFrame event as well
as placing buttons inside Movie Clips so that you can disable them (by
hiding the clip).
- "Mapping."
The general technique of mapping is applied to a contrived
exercise but in a way so that you can apply it to other situations. Bring
your math "thinking cap" to this one.
- "Working
with Odd-Shaped Clickable Areas." Although buttons are great,
this exercise shows how movie clips (along with the hitTest()method)
can serve as alternatives to buttons.
- "Adapting
Built-in Smart Clips." Not only does this exercise show you
how to adapt the Menu Smart Clip that ships with Flash so that you can
use it, you also learn a bit about the process involved including using the
Debugger.
- "Creating
a Currency-Exchange Calculator."
We turn a simple currency
exchange calculation into a really usable application. There are some fancy
string maneuvers and a simple use of the loadVariables() method.
- "Creating
a Tooltip Smart Clip." The basic concepts from the "Custom
Cursor" workshop come into play, but we use getTimer() for the first
time
to add an optional delay.
- "Creating
a Digital Timer." In this workshop, we use the getTimer() in a
most typical way-to make a digital stopwatch.
- "Creating
an Analog Timer."
This workshop is really quite a snap after you
have the code from the "Digital Timer" workshop. You just add visual
hands to make a traditional analog stopwatch.
- "Creating
a Countdown Timer." We continue exploring traditional uses for
getTimer() and add a few graphics to make this progress bar-type of
timer. We also get to use math to calculate percentages.
- "Using
Math to Create a Circular Slider."
This workshop doesn't look
much different than a regular slider-it just follows a circular path.
However, to calculate angles and draw arcs, we use several trigonometry
functions from the Math object.
- "Developing
Time-Based Animations."
In a simple example, we see how
getTimer() can be used to ensure perfect synchronization-and how to
effectively drop frames if the animation is not keeping up.
- "Creating
a Multistate Button."
You'll make a button that behaves exactly
like a system-level button used in standard programs (such as your
browser, your word processor, and so on) by using a Movie Clip and
ActionScript.
- "Offline
Production."
We'll build an animation and then save the coordinates
of each step so that it can be used in a time-based application.
- "Creating
a Dynamic Slide Presentation." Here we build an XML application
that loads data dynamically to build a slide show with bullet points.
It's an exercise in using XML-structured data as well as general template
design.
- "Creating
JavaScript Cookies."
You'll learn how Flash (through JavaScript)
can read and write cookies so that the movie will remember the last set-tings
a user made.
- "Writing
JavaScript Inter-Movie Communications."
You'll make two Flash
movies "talk" to each other by way of JavaScript.
- "Fixing
Broken Scripts."
You'll be challenged to fix 10 faulty Flash files
(that you download from www.teleport.com/~phillip/actionscripting ).
For each one, you'll be given a clue and the solution to make things right
Back
to "ActionScripting in FLASH"