Essential ActionScript 3.0 (Paperback)
暫譯: Essential ActionScript 3.0 (平裝本)
Colin Moock
- 出版商: O'Reilly
- 出版日期: 2007-07-17
- 售價: $2,140
- 貴賓價: 9.5 折 $2,033
- 語言: 英文
- 頁數: 948
- 裝訂: Paperback
- ISBN: 0596526946
- ISBN-13: 9780596526948
-
相關分類:
ActionScript & FLASH
已過版
買這商品的人也買了...
-
$880$695 -
$880$695 -
$780$741 -
$780$663 -
$550$468 -
$690$545 -
$980$774 -
$1,200$948 -
$880$695 -
$680$530 -
$1,560$1,326 -
$550$468 -
$990$891 -
$290$226 -
$600$480 -
$720$612 -
$880$695 -
$1,180$1,003 -
$980$774 -
$490$387 -
$620$490 -
$780$515 -
$750$593 -
$820$648 -
$890$703
相關主題
商品描述
Description
ActionScript 3.0 is a huge upgrade to Flash's programming language. The enhancements to ActionScript's performance, feature set, ease of use, cleanliness, and sophistication are considerable. Essential ActionScript 3.0 focuses on the core language and object-oriented programming, along with the Flash Player API. Essential ActionScript has become the #1 resource for the Flash and ActionScript development community, and the reason is the author, Colin Moock. Many people even refer to it simply as "The Colin Moock book."
And for good reason: No one is better at turning ActionScript inside out, learning its nuances and capabilities, and then explaining everything in such an accessible way. Colin Moock is not just a talented programmer and technologist; he's also a gifted teacher.
Essential ActionScript 3.0 is a radically overhauled update to Essential ActionScript 2.0. True to its roots, the book once again focuses on the core language and object-oriented programming, but also adds a deep look at the centerpiece of Flash Player's new API: display programming. Enjoy hundreds of brand new pages covering exciting new language features, such as the DOM-based event architecture, E4X, and namespaces--all brimming with real-world sample code.
The ActionScript 3.0 revolution is here, and Essential ActionScript 3.0's steady hand is waiting to guide you through it.
Adobe Developer Library is a co-publishing partnership between O'Reilly Media and Adobe Systems, Inc. and is designed to produce the number one information resources for developers who use Adobe technologies. Created in 2006, the Adobe Developer Library is the official source for comprehensive learning solutions to help developers create expressive and interactive web applications that can reach virtually anyone on any platform. With top-notch books and innovative online resources covering the latest in rich Internet application development, the Adobe Developer Library offers expert training and in-depth resources, straight from the source.
Table of Contents
Foreword
Preface
Part I. ActionScript from the Ground Up
1. Core Concepts
Tools for Writing ActionScript Code
Flash Client Runtime Environments
Compilation
Quick Review
Classes and Objects
Creating a Program
Packages
Defining a Class
Virtual Zoo Review
Constructor Methods
Creating Objects
Variables and Values
Constructor Parameters and Arguments
Expressions
Assigning One Variable's Value to Another
An Instance Variable for Our Pet
Instance Methods
Members and Properties
Virtual Zoo Review
Break Time!
2. Conditionals and Loops
Conditionals
Loops
Boolean Logic
Back to Classes and Objects
3. Instance Methods Revisited
Omitting the this Keyword
Bound Methods
Using Methods to Examine and Modify an Object's State
Get and Set Methods
Handling an Unknown Number of Parameters
Up Next: Class-Level Information and Behavior
4. Static Variables and Static Methods
Static Variables
Constants
Static Methods
Class Objects
C++ and Java Terminology Comparison
On to Functions
5. Functions
Package-Level Functions
Nested Functions
Source-File-Level Functions
Accessing Definitions from Within a Function
Functions as Values
Function Literal Syntax
Recursive Functions
Using Functions in the Virtual Zoo Program
Back to Classes
6. Inheritance
A Primer on Inheritance
Overriding Instance Methods
Constructor Methods in Subclasses
Preventing Classes from Being Extended and Methods from Being Overridden
Subclassing Built-in Classes
The Theory of Inheritance
Abstract Not Supported
Using Inheritance in the Virtual Zoo Program
Virtual Zoo Program Code
It's Runtime!
7. Compiling and Running a Program
Compiling with the Flash Authoring Tool
Compiling with Flex Builder 2
Compiling with mxmlc
Compiler Restrictions
The Compilation Process and the Classpath
Strict-Mode Versus Standard-Mode Compilation
The Fun's Not Over
8. Datatypes and Type Checking
Datatypes and Type Annotations
Untyped Variables, Parameters, Return Values, and Expressions
Strict Mode's Three Special Cases
Warnings for Missing Type Annotations
Detecting Reference Errors at Compile Time
Casting
Conversion to Primitive Types
Default Variable Values
null and undefined
Datatypes in the Virtual Zoo
More Datatype Study Coming Up
9. Interfaces
The Case for Interfaces
Interfaces and Multidatatype Classes
Interface Syntax and Use
Another Multiple-Type Example
More Essentials Coming
10. Statements and Operators
Statements
Operators
Up Next: Managing Lists of Information
11. Arrays
What Is an Array?
The Anatomy of an Array
Creating Arrays
Referencing Array Elements
Determining the Size of an Array
Adding Elements to an Array
Removing Elements from an Array
Checking the Contents of an Array with the toString( ) Method
Multidimensional Arrays
On to Events
12. Events and Event Handling
ActionScript Event Basics
Accessing the Target Object
Accessing the Object That Registered the Listener
Preventing Default Event Behavior
Event Listener Priority
Event Listeners and Memory Management
Custom Events
Type Weakness in ActionScript's Event Architecture
Handling Events Across Security Boundaries
What's Next?
13. Exceptions and Error Handling
The Exception-Handling Cycle
Handling Multiple Types of Exceptions
Exception Bubbling
The finally Block
Nested Exceptions
Control-Flow Changes in try/catch/finally
Handling a Built-in Exception
More Gritty Work Ahead
14. Garbage Collection
Eligibility for Garbage Collection
Incremental Mark and Sweep
Disposing of Objects Intentionally
Deactivating Objects
Garbage Collection Demonstration
On to ActionScript Backcountry
15. Dynamic ActionScript
Dynamic Instance Variables
Dynamically Adding New Behavior to an Instance
Dynamic References to Variables and Methods
Using Dynamic Instance Variables to Create Lookup Tables
Using Functions to Create Objects
Using Prototype Objects to Augment Classes
The Prototype Chain
Onward!
16. Scope
Global Scope
Class Scope
Static Method Scope
Instance Method Scope
Function Scope
Scope Summary
The Internal Details
Expanding the Scope Chain via the with Statement
On to Namespaces
17. Namespaces
Namespace Vocabulary
ActionScript Namespaces
Creating Namespaces
Using a Namespace to Qualify Variable and Method Definitions
Qualified Identifiers
A Functional Namespace Example
Namespace Accessibility
Qualified-Identifier Visibility
Comparing Qualified Identifiers
Assigning and Passing Namespace Values
Open Namespaces and the use namespace Directive
Namespaces for Access-Control Modifiers
Applied Namespace Examples
Final Core Topics
18. XML and E4X
Understanding XML Data as a Hierarchy
Representing XML Data in E4X
Creating XML Data with E4X
Accessing XML Data
Processing XML with for-each-in and for-in
Accessing Descendants
Filtering XML Data
Traversing XML Trees
Changing or Creating New XML Content
Loading XML Data
Working with XML Namespaces
Converting XML and XMLList to a String
Determining Equality in E4X
More to Learn
19. Flash Player Security Restrictions
What's Not in This Chapter
The Local Realm, the Remote Realm, and Remote Regions
Security-Sandbox-Types
Security Generalizations Considered Harmful
Restrictions on Loading Content, Accessing Content as Data, Cross-Scripting, and Loading Data
Socket Security
Example Security Scenarios
Choosing a Local Security-Sandbox-Type
Distributor Permissions (Policy Files)
Creator Permissions (allowDomain( ))
Import Loading
Handling Security Violations
Security Domains
Two Common Security-Related Development Issues
On to Part II!
Part II. Display and Interactivity
20. The Display API and the Display List
Display API Overview
The Display List
Containment Events
Custom Graphical Classes
Go with the Event Flow
21. Events and Display Hierarchies
Hierarchical Event Dispatch
Event Dispatch Phases
Event Listeners and the Event Flow
Using the Event Flow to Centralize Code
Determining the Current Event Phase
Distinguishing Events Targeted at an Object from Events Targeted at That Object's Descendants
Stopping an Event Dispatch
Event Priority and the Event Flow
Display-Hierarchy Mutation and the Event Flow
Custom Events and the Event Flow
On to Input Events
22. Interactivity
Mouse-Input Events
Focus Events
Keyboard-Input Events
Text-Input Events
Flash Player-Level Input Events
From the Program to the Screen
23. Screen Updates
Scheduled Screen Updates
Post-Event Screen Updates
Redraw Region
Optimization with the Event.RENDER Event
Let's Make It Move!
24. Programmatic Animation
No Loops
Animating with the ENTER_FRAME Event
Animating with the TimerEvent.TIMER Event
Choosing Between Timer and Event.ENTER_FRAME
A Generalized Animator
Velocity-Based Animation
Moving On to Strokes 'n' Fills
25. Drawing with Vectors
Graphics Class Overview
Drawing Lines
Drawing Curves
Drawing Shapes
Removing Vector Content
Example: An Object-Oriented Shape Library
From Lines to Pixels
26. Bitmap Programming
The BitmapData and Bitmap Classes
Pixel Color Values
Creating a New Bitmap Image
Loading an External Bitmap Image
Examining a Bitmap
Modifying a Bitmap
Copying Graphics to a BitmapData Object
Applying Filters and Effects
Freeing Memory Used by Bitmaps
Words, Words, Words
27. Text Display and Input
Creating and Displaying Text
Modifying a Text Field's Content
Formatting Text Fields
Fonts and Text Rendering
Missing Fonts and Glyphs
Determining Font Availability
Determining Glyph Availability
Embedded-Text Rendering
Text Field Input
Text Fields and the Flash Authoring Tool
Loading . . . Please Wait . . .
28. Loading External Display Assets
Using Loader to Load Display Assets at Runtime
Compile-Time Type-Checking for Runtime-Loaded Assets
Accessing Assets in Multiframe .swf Files
Instantiating a Runtime-Loaded Asset
Using Socket to Load Display Assets at Runtime
Removing Runtime Loaded .swf Assets
Embedding Display Assets at CompileTime
On to Part III
Part III. Applied ActionScript Topics
29. ActionScript and the Flash Authoring Tool
The Flash Document
Timelines and Frames
Timeline Scripting
The Document Class
Symbols and Instances
Linked Classes for Movie Clip Symbols
Accessing Manually Created Symbol Instances
Accessing Manually Created Text
Programmatic Timeline Control
Instantiating Flash Authoring Symbols via ActionScript
Instance Names for Programmatically Created Display Objects
Linking Multiple Symbols to a Single Superclass
The Composition-Based Alternative to Linked Classes
Preloading Classes
Up Next: Using the Flex Framework
30. A Minimal MXML Application
The General Approach
A Real UI Component Example
Sharing with Your Friends
31. Distributing a Class Library
Sharing Class Source Files
Distributing a Class Library as a .swc File
Distributing a Class Library as a .swf File
Appendix
Index
商品描述(中文翻譯)
### 描述
ActionScript 3.0 是 Flash 程式語言的一次重大升級。ActionScript 在性能、功能集、易用性、整潔性和複雜性方面的增強是相當可觀的。《Essential ActionScript 3.0》專注於核心語言和物件導向程式設計,以及 Flash Player API。《Essential ActionScript》已成為 Flash 和 ActionScript 開發社群的首要資源,原因在於作者 Colin Moock。許多人甚至簡稱它為「Colin Moock 的書」。
這是有充分理由的:沒有人比他更擅長深入剖析 ActionScript,學習其細微差別和能力,然後以如此易於理解的方式解釋一切。Colin Moock 不僅是一位才華橫溢的程式設計師和技術專家;他也是一位天賦異稟的教師。
《Essential ActionScript 3.0》是對《Essential ActionScript 2.0》的徹底更新。忠於其根源,這本書再次專注於核心語言和物件導向程式設計,但也深入探討了 Flash Player 新 API 的核心:顯示程式設計。享受數百頁全新的內容,涵蓋令人興奮的新語言特性,如基於 DOM 的事件架構、E4X 和命名空間——所有內容都充滿了實際的範例程式碼。
ActionScript 3.0 革命已經來臨,而《Essential ActionScript 3.0》的穩健指導將引領你穿越這一切。
**Adobe 開發者圖書館**是 O'Reilly Media 和 Adobe Systems, Inc. 之間的共同出版夥伴關係,旨在為使用 Adobe 技術的開發者提供首要的信息資源。成立於 2006 年,Adobe 開發者圖書館是幫助開發者創建表現豐富和互動性網頁應用程式的官方來源,這些應用程式幾乎可以觸及任何平台的任何人。擁有一流的書籍和創新的在線資源,涵蓋最新的豐富互聯網應用程式開發,Adobe 開發者圖書館提供專業的培訓和深入的資源,直接來自源頭。
### 目錄
**前言**
**序言**
**第一部分:從基礎開始學習 ActionScript**
1. 核心概念
- 撰寫 ActionScript 程式碼的工具
- Flash 客戶端運行環境
- 編譯
- 快速回顧
- 類別和物件
- 創建程式
- 套件
- 定義類別
- 虛擬動物園回顧
- 建構子方法
- 創建物件
- 變數和數值
- 建構子參數和引數
- 表達式
- 將一個變數的值賦給另一個變數
- 我們的寵物的實例變數
- 實例方法
- 成員和屬性
- 虛擬動物園回顧
- 休息時間!
2. 條件語句和迴圈
- 條件語句
- 迴圈
- 布林邏輯
- 回到類別和物件
3. 實例方法重訪
- 省略 this 關鍵字
- 綁定方法
- 使用方法檢查和修改物件的狀態
- 獲取和設置方法
- 處理不確定數量的參數
- 接下來:類別級別的信息和行為
4. 靜態變數和靜態方法
- 靜態變數
- 常數
- 靜態方法
- 類別物件
- C++ 和 Java 的術語比較
- 進入函數
5. 函數
- 套件級別的函數
- 嵌套函數
- 源文件級別的函數
- 從函數內部訪問定義
- 函數作為值
- 函數字面量語法
- 遞歸函數
- 在虛擬動物園程式中使用函數
- 回到類別
6. 繼承
- 繼承入門
- 重寫實例方法
- 子類中的建構子方法
- 防止類別被擴展和方法被重寫
- 子類化內建類別
- 繼承理論
- 不支持抽象
- 在虛擬動物園程式中使用繼承
- 虛擬動物園程式碼
- 它是運行時!
7. 編譯和運行程式
- 使用 Flash Authoring Tool 編譯
- 使用 Flex Builder 2 編譯
- 使用 mxmlc 編譯
- 編譯器限制
- 編譯過程和類路徑
- 嚴格模式與標準模式編譯
- 樂趣還未結束
8. 數據類型和類型檢查
- 數據類型和類型註解
- 無類型變數、參數、返回值和表達式
- 嚴格模式的三個特殊情況
- 缺少類型註解的警告
- 在編譯時檢測引用錯誤
- 類型轉換
- 轉換為原始類型
- 預設變數值
- null 和 undefined
- 虛擬動物園中的數據類型
- 更多數據類型研究即將到來
9. 介面
- 介面的必要性
- 介面和多數據類型類別
- 介面語法和使用
- 另一個多類型範例
- 更多基本內容即將到來
10. 語句和運算符
- 語句
- 運算符
- 接下來:管理信息列表
11. 陣列
- 陣列是什麼?
- 陣列的結構
- 創建陣列
- 引用陣列元素
- 確定陣列的大小
- 向陣列添加元素
- 從陣列中移除元素
- 使用 toString() 方法檢查陣列內容
- 多維陣列
- 進入事件
12. 事件和事件處理
- ActionScript 事件基礎
- 訪問目標物件
- 訪問註冊監聽器的物件
- 防止預設事件行為
- 事件監聽器優先級
- 事件監聽器和記憶體管理
- 自定義事件
- ActionScript 事件架構中的類型弱點
- 跨安全邊界處理事件
- 接下來是什麼?
13. 異常和錯誤處理
- 異常處理循環
- 處理多種類型的異常
- 異常冒泡
- finally 區塊
- 嵌套異常
- try/catch/finally 中的控制流變更
- 處理內建異常
- 更艱難的工作即將到來
14. 垃圾回收
- 垃圾回收的資格
- 增量標記和清除
- 有意地處理物件
- 停用物件
- 垃圾回收演示
- 進入 ActionScript 的後台
15. 動態 ActionScript
- 動態實例變數
- 動態添加新行為到實例
- 動態引用變數和方法
- 使用動態實例變數創建查找表
- 使用函數創建物件
- 使用原型物件增強類別
- 原型鏈
- 繼續前進!
16. 範圍
- 全局範圍
- 類別範圍
- 靜態方法範圍
- 實例方法範圍
- 函數範圍
- 範圍摘要
- 內部細節
- 通過 with 語句擴展範圍鏈
- 進入命名空間
17. 命名空間
- 命名空間詞彙
- ActionScript 命名空間
- 創建命名空間
- 使用命名空間來限定變數和方法定義
- 限定識別符
- 一個功能性命名空間範例
- 命名空間的可訪問性
- 限定識別符的可見性
- 比較限定識別符
- 指派和傳遞命名空間值
- 開放命名空間和使用 namespace 指令
- 用於訪問控制修飾符的命名空間
- 應用命名空間範例