1.0.
Introduction
Using ActionScript, you can create Flash
applications that do just about anything you can imagine. But
before launching into the vast possibilities, let's start with the
basic foundation. The good news is that ActionScript commands
follow a well-defined pattern, sharing similar syntax, structure,
and concepts. Mastering the fundamental grammar puts you well on
the way to mastering ActionScript.
This chapter addresses the frequent tasks and
problems that relate to core ActionScript knowledge. Whether you
are a beginner or masteror somewhere in betweenthese recipes help
you handle situations that arise in every ActionScript project.
This book assumes that you have obtained a copy
of Flex Builder 2 and have
successfully installed it on your computer. It's also helpful if
you have some experience using a previous version of ActionScript
as well.
When you launch Flex Builder 2, the Eclipse IDE
should start up and present you with a welcome screen. You are
presented with various options to get started and more information
about Flex and ActionScript 3, such as links to documentation,
tutorials, and more. You can close that screen by clicking on the
small "x" on its tab. Now you are in the Eclipse IDE itself, ready to start
coding; but where do you go from here?
Flex Builder 2 allows you to create three kinds
of projects: a Flex project,
Flex Library project, and an ActionScript project. The difference
is that Flex projects have access to the entire Flex Framework,
which includes all of the Flex components, layout management,
transitions, styles, themes, data binding, and all the other stuff
that goes into making a Flex Rich Internet Application. Flex
applications are written in
MXML (a form of XML), which
describes the layout and relationship between components. They use
ActionScript for their business logic. Although you can use the
ActionScript knowledge you learn from here in Flex applications you
write, this book concentrates on ActionScript projects
exclusively.
Now, if you are familiar with Flash 8 or earlier
versions of the Flash IDE, you may be a bit baffled the first time
you open up Flex Builder 2. There is no timeline, no library, no
drawing tools or color pickers. You'll be doing pretty much
everything by code alone, which is why it is called an
ActionScript project, rather than a Flash project. So
we'll first cover how to create a project and then to get you
started with entering your first ActionScript statements.
|