ActionScript: The Definitive Guide

Overview

Given its ability to deliver high-impact experiences even over low-bandwidth connections, Flash has become the de facto standard for hundreds of thousands of multimedia web developers worldwide.Flash 5 now includes a new full-fledged programming language called "ActionScript" for controlling animation and multimedia. It's a quantum leap from the bare-bones "Actions" supported in Flash 4, andActionScript: The Definitive Guide is the first book dedicated entirely to documenting and demonstrating this new ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (34) from $1.99   
  • New (5) from $5.27   
  • Used (29) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$5.27
Seller since 2006

Feedback rating:

(134)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
2001-05 Paperback New New! Excellent condition. Choose Expedited Shipping for Fast 2-3 Business Day Delivery!

Ships from: Spring Hill, KS

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$15.20
Seller since 2008

Feedback rating:

(169)

Condition: New
1565928520 BRAND NEW NEVER USED IN STOCK 125,000+ HAPPY CUSTOMERS SHIP EVERY DAY WITH FREE TRACKING NUMBER

Ships from: fallbrook, CA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$22.08
Seller since 2009

Feedback rating:

(872)

Condition: New
1565928520 *BRAND NEW* Ships Same Day or Next!

Ships from: Springfield, VA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$50.00
Seller since 2014

Feedback rating:

(164)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
$50.00
Seller since 2014

Feedback rating:

(164)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

Given its ability to deliver high-impact experiences even over low-bandwidth connections, Flash has become the de facto standard for hundreds of thousands of multimedia web developers worldwide.Flash 5 now includes a new full-fledged programming language called "ActionScript" for controlling animation and multimedia. It's a quantum leap from the bare-bones "Actions" supported in Flash 4, andActionScript: The Definitive Guide is the first book dedicated entirely to documenting and demonstrating this new language.ActionScript includes all fundamental programming constructs (variables, loops, conditionals, functions, etc.), and is inextricably fused with Flash's authoring behaviors and animation timelines. Because ActionScript is based heavily on the ECMAScript Language Specification (ECMA-262) and is syntactically nearly identical to JavaScript, Macromedia expects thousands of existing JavaScript programmers to migrate to ActionScript.This book is divided into three sections.

  • "ActionScript Fundamentals" introduces both programmers and non-programmers to the new language by first describing fundamental programming concepts and then delineating in detail the components, syntax, and usage of ActionScript.
  • "Applied ActionScript Code Depot" shows you how to use common applications, such as processing online forms.
  • "Language Reference" is a concise and detailed reference that makes all ActionScript globals, properties, and objects, including extensive implementation samples, easy to find quickly.
Code samples are also available from the "Code Depot" on theauthor's web site devoted to Flash developers.Topics covered in this book include:
  • Step-by-step tutorials of the most common ActionScript behaviors
  • Object-oriented programming in Flash
  • Intelligent interface development
  • Server communication
  • Dynamic content generation
  • Password protection
  • String handling
  • Message boards
  • Basic physics
  • Games
ActionScript: The Definitive Guide is structured so both programmers and non-programmers can learn how to use ActionScript. This book will take you well beyond simple Flash animations so you can create your own enhanced Flash-driven sites.
Read More Show Less

Product Details

  • ISBN-13: 9781565928527
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 5/8/2001
  • Edition description: Older Edition
  • Pages: 720
  • Product dimensions: 7.00 (w) x 9.19 (h) x 1.30 (d)

Meet the Author

is an independent web guru with a passion for networked creativity and expression. He has been researching, designing, and developing for the Web since 1995. Colin served as webmaster for SoftQuad, Inc. (makers of HoTMetaL PRO) until 1997, and then as web evangelist for ICE (one of Canada's leading interactive agencies) until 2001. He has created interactive content for Sony, Levi's, Nortel, Air Canada, Procter & Gamble, and Hewlett-Packard. Colin now divides his time between writing, speaking at conferences, and researching emerging web technology. His award-winning Flash work and his renowned support site for Flash developers (http://www.moock.org) have made him a well-known personality in the Flash developer community. He is a contributor to macromedia.com's Flash developer center, a tutorialist in the Flash MX Bible (2002, Wiley Publishing Inc.), and regularly appears in industry magazines such as cre@te! online. Colin's latest personal undertaking is Unity (http://www.moock.org/unity/), a Flash socket server for multi-user content.

Read More Show Less

Read an Excerpt

Chapter 13

Movie Clips

Every Flash document contains a Stage--on which we place shapes, text, and other visual elements--and a main timeline, through which we define changes to the Stage's contents over time. The Stage (i.e., the main movie) may contain independent submovies, christened movie clips (or clips for short). Each movie clip has its own independent timeline and canvas (the Stage is the canvas of the main movie) and can even contain other movie clips. A clip that contains another clip is referred to as that clip's host clip or parent clip.

A single Flash document can contain a hierarchy of interrelated movie clips. For example, the main movie may contain a mountainous landscape. A separate movie clip containing an animated character can be moved across the landscape to give the illusion that the character is walking. Another movie clip inside the character clip can be used to independently animate the character's blinking eyes. When the independent elements in the cartoon character are played back together, they appear as a single piece of content. Furthermore, each component can react intelligently to the others--we can tell the eyes to blink when the character stops moving or tell the legs to walk when the character starts moving.

ActionScript offers detailed control over movie clips; we can play a clip, stop it, move its playhead within its timeline, programmatically set its properties (like its size, rotation, transparency level, and position on the Stage) and manipulate it as a true programming object. As a formal component of the ActionScript language, movie clips may be thought of as the raw material used to produce programmatically generated content in Flash. For example, a movie clip may serve as a ball or a paddle in a pong game, as an order form in a catalog web site, or simply as a container for background sounds in an animation. At the end of this chapter we'll use movie clips as the hands on a clock and the answers in a multiple-choice quiz.

The "Objectness" of Movie Clips

As of Flash 5, movie clips can be manipulated like the objects we learned about in Chapter 12, Objects and Classes. We may retrieve and set the properties of a clip, and we may invoke built-in or custom methods on a clip. Unlike other objects, an operation performed on a clip may have a visible or audible result in the Player.

Movie clips are not truly a type of object; there is no MovieClip class or constructor, nor can we use an object literal to instantiate a movie clip in our code. So what, then, are movie clips if not objects? They are members of their very own object-like datatype, called movieclip (we can prove it by executing typeof on a movie clip, which returns the string "movieclip"). The main difference between movie clips and true objects is how they are allocated (created) and deallocated (disposed of, or freed). For details, see Chapter 15, Advanced Topics. Despite this technicality, however, we nearly always treat movie clips exactly like objects.

So how does the "objectness" of movie clips affect our use of them in ActionScript? Most notably, it dictates the way we control clips and examine their properties. Movie clips can be controlled directly through built-in methods. For example:

eyes.play( );

We can retrieve and set a movie clip's properties using the dot operator, just as we would access the properties of any object:

ball._xscale = 90;
var radius = ball._width / 2;

A variable in a movie clip is simply a property of that clip, and we can use the dot operator to set and retrieve variable values:

myClip.myVariable = 14;
x = myClip.myVariable;

Submovie clips can be treated as object properties of their parent movie clips. We therefore use the dot operator to access "nested" clips:

clipA.clipB.clipC.play( );

and we use the reserved _ parent property to refer to the clip containing the current clip:

_ parent.clipC.play( );

Treating clips as objects affords us all the luxuries of convenient syntax and flexible playback control. But our use of clips as objects also lets us manage clips as data; we can store a movie clip in an array element or a variable and even pass a clip reference to a function as an argument! Here, for example, is a function that moves a clip to a particular location on the screen:

function moveClip (clip, x, y)
{clip._x = x;
clip._y = y;}
moveClip(ball, 14, 399);

Throughout the rest of this chapter, we'll learn the specifics of referencing, controlling, and manipulating movie clips as data objects...

Read More Show Less

Table of Contents

Foreword;
Preface;
What Can ActionScript Do?;
The Code Depot;
Showcase;
Typographical Conventions;
We’d Like to Hear from You;
Acknowledgments;
ActionScript Fundamentals;
Chapter 1: A Gentle Introduction for Non-Programmers;
1.1 Some Basic Phrases;
1.2 Further ActionScript Concepts;
1.3 Building a Multiple-Choice Quiz;
1.4 Onward!;
Chapter 2: Variables;
2.1 Creating Variables (Declaration);
2.2 Assigning Variables;
2.3 Changing and Retrieving Variable Values;
2.4 Types of Values;
2.5 Variable Scope;
2.6 Some Applied Examples;
2.7 Onward!;
Chapter 3: Data and Datatypes;
3.1 Data Versus Information;
3.2 Retaining Meaning with Datatypes;
3.3 Creating and Categorizing Data;
3.4 Datatype Conversion;
3.5 Primitive Data Versus Composite Data;
3.6 Onward!;
Chapter 4: Primitive Datatypes;
4.1 The Number Type;
4.2 Integers and Floating-Point Numbers;
4.3 Numeric Literals;
4.4 Working with Numbers;
4.5 The String Type;
4.6 Working with Strings;
4.7 The Boolean Type;
4.8 Undefined;
4.9 Null;
4.10 Onward!;
Chapter 5: Operators;
5.1 General Features of Operators;
5.2 The Assignment Operator;
5.3 Arithmetic Operators;
5.4 The Equality and Inequality Operators;
5.5 The Comparison Operators;
5.6 The String Operators;
5.7 The Logical Operators;
5.8 The Grouping Operator;
5.9 The Comma Operator;
5.10 The void Operator;
5.11 Other Operators;
5.12 Onward!;
Chapter 6: Statements;
6.1 Types of Statements;
6.2 Statement Syntax;
6.3 The ActionScript Statements;
6.4 Statements Versus Actions;
6.5 Onward!;
Chapter 7: Conditionals;
7.1 The if Statement;
7.2 The else Statement;
7.3 The else if Statement;
7.4 Simulating the switch Statement;
7.5 Compact Conditional Syntax;
7.6 Onward!;
Chapter 8: Loop Statements;
8.1 The while Loop;
8.2 Loop Terminology;
8.3 The do-while Loop;
8.4 The for Loop;
8.5 The for-in Loop;
8.6 Stopping a Loop Prematurely;
8.7 Timeline and Clip Event Loops;
8.8 Onward!;
Chapter 9: Functions;
9.1 Creating Functions;
9.2 Running Functions;
9.3 Passing Information to Functions;
9.4 Exiting and Returning Valuesfrom Functions;
9.5 Function Literals;
9.6 Function Availability and Life Span;
9.7 Function Scope;
9.8 Function Parameters Revisited;
9.9 Recursive Functions;
9.10 Internal Functions;
9.11 Functions as Objects;
9.12 Centralizing Code;
9.13 The Multiple-Choice Quiz Revisited;
9.14 Onward!;
Chapter 10: Events and Event Handlers;
10.1 Synchronous Code Execution;
10.2 Event-Based AsynchronousCode Execution;
10.3 Types of Events;
10.4 Event Handlers;
10.5 Event Handler Syntax;
10.6 Creating Event Handlers;
10.7 Event Handler Scope;
10.8 Button Events;
10.9 Movie Clip Events Overview;
10.10 Movie-Playback Movie Clip Events;
10.11 The User-Input Movie Clip Events;
10.12 Order of Execution;
10.13 Copying Clip Event Handlers;
10.14 Refreshing the Screen with updateAfterEvent;
10.15 Code Reusability;
10.16 Dynamic Movie Clip Event Handlers;
10.17 Event Handlers Applied;
10.18 Onward!;
Chapter 11: Arrays;
11.1 What Is an Array?;
11.2 The Anatomy of an Array;
11.3 Creating Arrays;
11.4 Referencing Array Elements;
11.5 Determining the Size of an Array;
11.6 Named Array Elements;
11.7 Adding Elements to an Array;
11.8 Removing Elements from an Array;
11.9 General Array-Manipulation Tools;
11.10 Multidimensional Arrays;
11.11 The Multiple-Choice Quiz, Take 3;
11.12 Onward!;
Chapter 12: Objects and Classes;
12.1 The Anatomy of an Object;
12.2 Instantiating Objects;
12.3 Object Properties;
12.4 Methods;
12.5 Classes and Object-Oriented Programming;
12.6 Built-in ActionScript Classes and Objects;
12.7 Onward!;
Chapter 13: Movie Clips;
13.1 The “Objectness” of Movie Clips;
13.2 Types of Movie Clips;
13.3 Creating Movie Clips;
13.4 Movie and Instance Stacking Order;
13.5 Referring to Instances and Main Movies;
13.6 Removing Clip Instances and Main Movies;
13.7 Built-in Movie Clip Properties;
13.8 Movie Clip Methods;
13.9 Applied Movie Clip Examples;
13.10 The Last Quiz;
13.11 Onward!;
Chapter 14: Lexical Structure;
14.1 Whitespace;
14.2 Statement Terminators (Semicolons);
14.3 Comments;
14.4 Reserved Words;
14.5 Identifiers;
14.6 Case Sensitivity;
14.7 Onward!;
Chapter 15: Advanced Topics;
15.1 Copying, Comparing, and Passing Data;
15.2 Bitwise Programming;
15.3 Advanced Function Scope Issues;
15.4 The movieclip Datatype;
15.5 Onward!;
Applied ActionScript;
Chapter 16: ActionScript Authoring Environment;
16.1 The Actions Panel;
16.2 Adding Scripts to Frames;
16.3 Adding Scripts to Buttons;
16.4 Adding Scripts to Movie Clips;
16.5 Where’s All the Code?;
16.6 Productivity;
16.7 Externalizing ActionScript Code;
16.8 Packaging Components as Smart Clips;
16.9 Onward!;
Chapter 17: Flash Forms;
17.1 The Flash Form Data Cycle;
17.2 Creating a Flash Fill-in Form;
17.3 Onward!;
Chapter 18: On-Screen Text Fields;
18.1 Dynamic Text Fields;
18.2 User-Input Text Fields;
18.3 Text Field Options;
18.4 Text Field Properties;
18.5 HTML Support;
18.6 Working with Text Field Selections;
18.7 Empty Text Fields and the for-in Statement;
18.8 Onward!;
Chapter 19: Debugging;
19.1 Debugging Tools;
19.2 Debugging Methodology;
19.3 Onward!;
Language Reference;
Chapter 20: ActionScript Language Reference;
20.1 Global Functions;
20.2 Global Properties;
20.3 Built-in Classes and Objects;
20.4 Entry Headings;
20.5 Alphabetical Language Reference;
Appendixes;
Resources;
ActionScript and Programming;
ECMA-262 Resources;
Object-Oriented Programming;
SWF File Format;
Latin 1 Character Repertoire and Keycodes;
Backward Compatibility;
Updates to the Flash 5 Player, Build 41;
Controlling Movie Clips;
Differences from ECMA-262 and JavaScript;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 3 Customer Reviews
  • Anonymous

    Posted January 12, 2005

    The only book you'll need.

    I learned more about ActionScript in the first chapter of this book than in all the 'Flash'/'ActionScript' books or bibles (including those carrying the Macromedia signature), websites, even the ActionScript reference guide included with Flash, combined. This was the answer I was searching for to understanding Flash's programming language, which for someone who is not a programmer is as foreign as Japanese or hieroglyphics. Everything in this book is broken down and explained (in a way that everyone can understand); it's truly the ActionScript curriculum as far as I'm concerned. I spent my time looking everywhere but here; don't make the same mistake I did. If you don't understand programming but know that the power of Flash is in ActionScript, get this book. Even if you have to wait for it to be shipped. Overnight it! It's worth the time and money you'll spend figuring out that this is the only reference that will teach you something.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 30, 2001

    Absolutely the best book for learning programming and ActionScript

    I've been a programmer for over 15 years and this is a great book if you don't know programming at all. Outside of Flash he does a good job of teaching you how to think like a programmer and after you've mastered that thought process you can program in any language.<p> Colin Moock is an excellent teacher. He introduces the student to some terms they'll hear often through out the book. And then takes them go through a real life example. So before you make it out of Chapter 1 you will have already learned enough to be dangerous.<p> I like to learn like this. Nobody wants to go through each function step by step. I don't have the patience for it. If a book goes too slow you're likely to get bored and feel like you've chosen the wrong book. This book empowers you from the beginning and makes you stronger as you read each chapter.<p> While I'm not new to programming, I am new to Flash. Just learning action script is teaching me alot about Flash.<p> Purhaps the second best thing about this book is the ActionScript reference in the back of the book. Once you know how to program you just may need to look up a function or two and the reference will come in handy. It's sad to say, but this reference is much better than the reference that comes from Macromedia/Allaire.<p> Whether you are an expert or a beginner this book is for you. Don't even hesitate, run now to buy this book!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 16, 2001

    Here's the Beef

    When Macromedia dumped the old version of Actionscript in favor of a shiny new ECMA-modelled replacement, I was overjoyed (like everyone else). I cracked open a few good Javascript books (most notably, 'Javascript : The Definitive Guide', also from O'Reilly and Wrox's 'Javascript Objects') and dug in. The problem is that there are no movie clips in Javascript (read : the object model is very different), most of the event handlers have no equivalents outside of Actionscript (read : the event model is very different), etc. DHTML and Flash are different worlds and this book recognizes that fact. Check out the toc on this page - the chapter 'Events and Event Handlers' that devotes enough space to covering movie clips events to actually make them understandable, a chapter on object-oriented programming (OOP) in Actionscript, a whole chapter on movie clips that includes the best explanation of stacking order (think of swapDepths, _level's, etc here) that I've seen. There are illustrative code snippets on practically every page and the Actionscript Language Reference at the back of the book (the last 250 pages or so) kills the wimpy Actionscript Dictionary furnished by Macromedia in the Actionscript Reference Guide (more info and longer and more useful script snippets). Colin Moock wrote the book that I wish had come with my shrink-wrapped Flash 5 upgrade.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 3 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)