Résumé
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, and ActionScript: 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 the author'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.
Contents
Foreword
Preface
I. ActionScript Fundamentals
1. A Gentle Introduction for
Non-Programmers
Some Basic Phrases
Further ActionScript Concepts
Building a Multiple-Choice Quiz
2. Variables
Creating Variables (Declaration)
Assigning Variables
Changing and Retrieving Variable
Values
Types of Values
Variable Scope
Some Applied Examples
3. Data and Datatypes
Data Versus Information
Retaining Meaning with Datatypes
Creating and Categorizing Data
Datatype Conversion
Primitive Data Versus Composite
Data
4. Primitive Datatypes
The Number Type
Integers and Floating-Point
Numbers
Numeric Literals
Working with Numbers
The String Type
Working with Strings
The Boolean Type
Undefined
Null
5. Operators
General Features of Operators
The Assignment Operator
Arithmetic Operators
The Equality and Inequality
Operators
The Comparison Operators
The String Operators
The Logical Operators
The Grouping Operator
The Comma Operator
The void Operator
Other Operators
6. Statements
Types of Statements
Statement Syntax
The ActionScript Statements
Statements Versus Actions
7. Conditionals
The if Statement
The else Statement
The else if Statement
Simulating the switch Statement
Compact Conditional Syntax
8. Loop Statements
The while Loop
Loop Terminology
The do-while Loop
The for Loop
The for-in Loop
Stopping a Loop Prematurely
Timeline and Clip Event Loops
9. Functions
Creating Functions
Running Functions
Passing Information to Functions
Exiting and Returning Values from
Functions
Function Literals
Function Availability and Life
Span
Function Scope
Function Parameters Revisited
Recursive Functions
Internal Functions
Functions as Objects
Centralizing Code
The Multiple-Choice Quiz Revisited
10. Events and Event Handlers
Synchronous Code Execution
Event-Based Asynchronous Code
Execution
Types of Events
Event Handlers
Event Handler Syntax
Creating Event Handlers
Event Handler Scope
Button Events
Movie Clip Events Overview
Movie-Playback Movie Clip Events
The User-Input Movie Clip Events
Order of Execution
Copying Clip Event Handlers
Refreshing the Screen with
updateAfterEvent
Code Reusability
Dynamic Movie Clip Event
Handlers
Event Handlers Applied
11. Arrays
What Is an Array?
The Anatomy of an Array
Creating Arrays
Referencing Array Elements
Determining the Size of an Array
Named Array Elements
Adding Elements to an Array
Removing Elements from an Array
General Array-Manipulation Tools
Multidimensional Arrays
The Multiple-Choice Quiz, Take 3
12. Objects and Classes
The Anatomy of an Object
Instantiating Objects
Object Properties
Methods
Classes and Object-Oriented
Programming
Built-in ActionScript Classes and
Objects
13. Movie Clips
The "Objectness" of Movie Clips
Types of Movie Clips
Creating Movie Clips
Movie and Instance Stacking
Order
Referring to Instances and Main
Movies
Removing Clip Instances and Main
Movies
Built-in Movie Clip Properties
Movie Clip Methods
Applied Movie Clip Examples
The Last Quiz
14. Lexical Structure
Whitespace
Statement Terminators
(Semicolons)
Comments
Reserved Words
Identifiers
Case Sensitivity
15. Advanced Topics
Copying, Comparing, and Passing
Data
Bitwise Programming
Advanced Function Scope Issues
The movieclip Datatype
II. Applied ActionScript
16. ActionScript Authoring Environment
The Actions Panel
Adding Scripts to Frames
Adding Scripts to Buttons
Adding Scripts to Movie Clips
Where's All the Code?
Productivity
Externalizing ActionScript Code
Packaging Components as Smart
Clips
17. Flash Forms
The Flash Form Data Cycle
Creating a Flash Fill-in Form
18. On-Screen Text Fields
Dynamic Text Fields
User-Input Text Fields
Text Field Options
Text Field Properties
HTML Support
Working with Text Field
Selections
Empty Text Fields and the for-in
Statement
19. Debugging
Debugging Tools
Debugging Methodology
III. Language Reference
IV. Appendixes
A. Resources
B. Latin 1 Character Repertoire and Keycodes
C. Backward Compatibility
D. Differences from ECMA-262 and JavaScript
Index
L'auteur - Colin Moock
Colin Moock est webmaster depuis 1997. Sa notoriété parmi les flasheurs n'est plus à démontrer.
Caractéristiques techniques
PAPIER | |
Éditeur(s) | O'Reilly |
Auteur(s) | Colin Moock |
Parution | 01/05/2001 |
Nb. de pages | 695 |
Format | 17,8 x 23,3 |
Couverture | Broché |
Poids | 1024g |
Intérieur | Noir et Blanc |
EAN13 | 9781565928527 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse
- Informatique Graphisme et multimédia Web : Graphisme et animation Flash et Actionscript
- Informatique Développement d'applications Programmation graphique et multimédia Flash et Actionscript
- Informatique Développement d'applications Conception et développement web Flash et Actionscript
- Informatique Développement d'applications Conception et développement web Flash et Actionscript Actionscript
- Graphisme & Photo Graphisme Jeux Programmation de jeux
- Graphisme & Photo Graphisme 2D Freehand
- Graphisme & Photo Graphisme Web : Graphisme et animation Flash et Actionscript
- Graphisme & Photo Graphisme Web : Graphisme et animation Flash et Actionscript Actionscript