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 Ill use throughout the book.
- "What's
New in Flash MX"
introduces you to the key features in Flash
MX 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 some guidelines and a legend
for the rest of the book.
- "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. Its
impossible to discuss these elements without showing how they work, but
the goal of this chapter is just to 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 (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
theyre 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 revised 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.
- "Manipulating
Strings" looks at how to manipulate string data.
Often, the user will end up seeing this text onscreenbut not necessarily.
The ability to manipulate strings before the user sees them is very powerful.
- "Keyboard
Access and Modifying Onscreen Text" makes the leap to how
text is displayed onscreen. Flash MXs new TextField and TextFormat
objects are explored as well as listeners and keyboard control.
- "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. This chapter also covers the new runtime
drawing functions.
- "Homemade
Objects" shows you how to apply the 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.
- "Extending
ActionScript " introduces all of the new ways you can modify
ActionScript to make it behave as you want. You should definitely check
out this chapter because youll learn a few simple techniques that will
save
a ton of time.
- "Components"
walks through all the ways to build and use components,
from ways of making standard components work for you to creating custom
User Interfaces (custom UIs).
- "Interfacing
with External Data" shows you many of the ways that Flash
can talk to outside applications. Topics include reading text
files, interacting
with server applications, exchanging XML-structured data, exchanging
data through the new LocalConnection object, and saving data on the
users local machine with the local SharedObject. I didnt have time to
actually show you how to use outside tools, but this chapter shows you
practically everything else.
Workshops:
- "Ensuring
That Users Have the Flash Player 6."
This no-nonsense workshop
chapter discusses some of the ways to make sure that your audience
is equipped to see your Flash 6 creation. We also walk through an exercise
using Flash itself as a way to determine player version.
- "Creating
Custom Cursors." After two simple steps to make a custom cursor,
this workshop chapter goes on to make a component and then a custom
UI for that component. This workshop chapter is pretty involved. You
learn that you cant use buttons (even invisible ones) because they would
conflict with any buttons that you try to place this component over.
- "Creating
a Horizontal Slider."
In this workshop chapter, we make a slider
component that can work for anything from volume control to video playback.
We make this component 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 onEnterFrame event as
well as disabling buttons.
- "Mapping
and Scripted Masks." The general technique of mapping is
applied to a contrived exercise, but in a way that enables you to apply it
to
other situations. Bring your math thinking cap to this one.
- "Working
with Odd-Shaped Clickable Areas." Although buttons are great,
this workshop chapter shows how Movie Clips (along with the hitTest()
method) can serve as alternatives to buttons.
- "Adapting
Built-In Components." Not only does this exercise show you
how to adapt the look and feel of the ComboBox component that ships
with Flash, you also learn a bit about the process involved in looking
through someone elses code.
- "Creating
a Currency-Exchange Calculator." We turn a simple currencyexchange
calculation into a really usable application. This workshop chapter
includes some fancy string maneuvers and a simple use of the new
LoadVars object.
- "Creating
a Tooltip Component."
The basic concepts from Workshop
Chapter 2, Creating Custom Cursors, come into play, but we use
getTimer() for the first time to add an optional delay.
- "Creating
Timers." In this workshop chapter, we use the getTimer() function
in a most typical wayto make three separate timers: a digital stopwatch,
a traditional analog display, and a countdown timer (like a sand
hourglass). The code for the first two parts is nearly identical.
- "Using
Math to Create a Circular Slider." The result of this workshop
chapter doesnt look much different than a regular sliderit 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 to
use getTimer()to ensure perfect synchronizationand how to effectively
drop frames if the animation is not keeping up.
- "Drawing
Graphs." This workshop chapter uses the new drawing functions
to create graphs based on dynamic data. Then we go on to label the graph
using the TextField object and add a colored mask using the new
setMask() method.
- "Offline
Production."
Well 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 dynamically loads data (including images) to build a slide show
with bullet points. This workshop chapter is an exercise in using XMLstructured
data as well as general template design.
- "Using
the Local SharedObject to Remember User Settings"
In this work-
shop chapter, we build a language-selection interface so that users can
specify their language preferences.
- "Using
the LocalConnection Object for Inter-Movie Communication."
Perhaps the most under-appreciated new feature in Flash MX is the
LocalConnection object, which lets two Flash movies communicate. In
this workshop chapter, we use the LocalConnection object to build a help
system.
- "Fixing
Broken Scripts." This workshop chapter challenges you to fix
10 faulty Flash files (that you download from www.phillipkerman.com/
actionscripting). For each one, youll be given a clue and the solution
to
make things right.
Back
to "ActionScripting in FLASH MX"