Essential Actionscript 2.0
暫譯: Essential ActionScript 2.0
Colin Moock
- 出版商: O'Reilly
- 出版日期: 2004-07-20
- 售價: $1,590
- 貴賓價: 9.5 折 $1,511
- 語言: 英文
- 頁數: 532
- 裝訂: Paperback
- ISBN: 0596006527
- ISBN-13: 9780596006525
-
相關分類:
ActionScript & FLASH
已過版
買這商品的人也買了...
-
$680$537 -
$1,880$1,786 -
$980$774 -
$1,078Computing Concepts With Java Essentials, 3/e
-
$690$587 -
$590$466 -
$690$538 -
$750$638 -
$560$476 -
$2,390$2,271 -
$490$387 -
$720$612 -
$450$351 -
$850$723 -
$480$379 -
$750$593 -
$780$616 -
$580$493 -
$580$458 -
$780$616 -
$590$460 -
$490$382 -
$480$379 -
$480$379 -
$650$507
商品描述
Description:
In September 2003, Macromedia released Flash MX 2004, and with it,
ActionScript 2.0, a dramatically improved version of Flash's programming
language. ActionScript 2.0 introduces a formal object-oriented programming
syntax and methodology for creating Flash applications. From a developer's
perspective, the new OOP-based techniques in ActionScript 2.0 make applications
more natural to plan and conceptualize, more stable, more reusable across
projects, easier to maintain, change, and expand upon, and much more. In short,
they enhance the entire development process.
In Essential
ActionScript 2.0, bestselling author Colin Moock--one of the most
universally respected developers in the Flash community--covers everything
you'll need to know about the new ActionScript language and its methodologies
for producing movies, animation, and applications on the web. Moock guides
readers through this important new territory with his trademark
easy-to-understand style and expertise. Moock's goal throughout the book is not
just to get you to use object-oriented programming in your daily Flash work: he
wants you to reap the benefits of OOP; he wants you to understand ActionScript
2.0 completely. And without question, Moock is the author who can make this
happen.
Essential ActionScript 2.0 begins with a tour of the
language, including the fundamentals of object-oriented concepts, syntax, and
usage. Those who are new to OOP will learn the basics and how to apply their
understanding. Those who are familiar with OOP will leverage their prior
experience to learn about Flash-based OOP. The next part of the book shows how
to structure entire applications with ActionScript 2.0, teaching you best
practices and techniques to build scalable, extensible, stable apps. Next,
you'll explore a variety of approaches to various programming situations by
applying object-oriented programming strategies, known as design patterns, to
Flash.
Experienced Flash developers and programmers coming from other
languages will enjoy the sheer depth of Moocks's coverage and expertise in
Essential ActionScript 2.0. Novice programmers will appreciate the
frequent, low-jargon explanations that are often glossed over by advanced
programming books. As usual, Moock guarantees quality and accuracy by working
closely with Macromedia Flash engineers, including Rebecca Sun, lead developer
of ActionScript 2.0.
Whether you're ready to make the move to ActionScript
2.0 now or simply assessing it for the future, you'll find everything you need
to know within this book. Essential ActionScript 2.0 is the one book
every ActionScript coder must own.
Table of Contents:
Foreword
Preface
Part I. The ActionScript 2.0 Language
1. ActionScript 2.0 Overview
ActionScript 2.0 Features
Features Introduced by Flash Player 7
Flash MX 2004 Version 2 Components
ActionScript 1.0 and 2.0 in Flash Player 6 and 7
Let's Go OOP2. Object-Oriented ActionScript
Procedural Programming and Object-Oriented Programming
Key Object-Oriented Programming Concepts
But How Do I Apply OOP?
On with the Show!3. Datatypes and Type Checking
Why Static Typing?
Type Syntax
Compatible Types
Built-in Dynamic Classes
Circumventing Type Checking
Casting
Datatype Information for Built-in Classes
ActionScript 2.0 Type Checking Gotchas
Up Next: Creating Classes-Your Own Datatypes!4. Classes
Defining Classes
Constructor Functions (Take 1)
Properties
Methods
Constructor Functions (Take 2)
Completing the Box Class
Putting Theory into Practice5. Authoring an ActionScript 2.0 Class
Class Authoring Quick Start
Designing the ImageViewer Class
ImageViewer Implementation (Take 1)
Using ImageViewer in a Movie
ImageViewer Implementation (Take 2)
ImageViewer Implementation (Take 3)
Back to the Classroom6. Inheritance
A Primer on Inheritance
Subclasses as Subtypes
An OOP Chat Example
Overriding Methods and Properties
Constructor Functions in Subclasses
Subclassing Built-in Classes
Augmenting Built-in Classes and Objects
The Theory of Inheritance
Abstract and Final Classes Not Supported
Let's Try Inheritance7. Authoring an ActionScript 2.0 Subclass
Extending ImageViewer's Capabilities
The ImageViewerDeluxe Skeleton
Adding setPosition( ) and setSize( ) Methods
Autosizing the Image Viewer
Using ImageViewerDeluxe
Moving Right Along8. Interfaces
The Case for Interfaces
Interfaces and Multidatatype Classes
Interface Syntax and Use
Multiple Type Inheritance with Interfaces
Up Next, Packages9. Packages
Package Syntax
Defining Packages
Package Access and the Classpath
Simulating Packages in ActionScript 1.0
Just a Little More Theory10. Exceptions
The Exception-Handling Cycle
Handling Multiple Types of Exceptions
Exception Bubbling
The finally Block
Nested Exceptions
Control Flow Changes in try/catch/finally
Limitations of Exception Handling in ActionScript 2.0
From Concepts to CodePart II. Application Development
11. An OOP Application Framework
The Basic Directory Structure
The Flash Document (.fla file)
The Classes
The Document Timeline
The Exported Flash Movie (.swf file)
Projects in Flash MX Professional 2004
Let's See It in Action!12. Using Components with ActionScript 2.0
Currency Converter Application Overview
Preparing the Flash Document
The CurrencyConverter Class
Handling Component Events
Components Complete13. MovieClip Subclasses
The Duality of MovieClip Subclasses
Avatar: A MovieClip Subclass Example
Avatar: The Composition Version
Issues with Nested Assets
A Note on MovieClip Sub-subclasses
Curiouser and Curiouser14. Distributing Class Libraries
Sharing Class Source Files
Sharing Classes Without Sharing Source Files
Solving Real OOP ProblemsPart III. Design Pattern Examples in ActionScript 2.0
15. Introduction to Design Patterns
Bring on the Patterns16. The Observer Design Pattern
Implementing Observer in ActionScript 2.0
Logger: A Complete Observer Example
Memory Management Issues with Observer
Beyond Observer17. The Singleton Design Pattern
Implementing Singleton in ActionScript 2.0
The Singleton Pattern in the Logger Class
Singleton Versus Class Methods and Class Properties
A Warning Against Singletons as Globals
On to User Interfaces18. The Model-View-Controller Design Pattern
The General Architecture of MVC
A Generalized MVC Implementation
An MVC Clock
Further Exploration19. The Delegation Event Model
Structure and Participants
The Flow of Logic
Core Implementation
NightSky: A Delegation Event Model Example
Other Event Architectures in ActionScript
From Some Place to Some OtherPlacePart IV. Appendixes
A. ActionScript 2.0 Language Quick Reference
B. Differences from ECMAScript Edition 4
Index
商品描述(中文翻譯)
**描述:**
在2003年9月,Macromedia 發布了 Flash MX 2004,並隨之推出了 ActionScript 2.0,這是 Flash 程式語言的一個顯著改進版本。ActionScript 2.0 引入了一種正式的物件導向程式設計語法和方法論,用於創建 Flash 應用程式。從開發者的角度來看,ActionScript 2.0 中基於 OOP 的新技術使得應用程式的規劃和概念化變得更加自然,更加穩定,更加可重用,維護、變更和擴展也變得更加容易,還有更多的優勢。簡而言之,它們增強了整個開發過程。
在《Essential ActionScript 2.0》中,暢銷書作者 Colin Moock——Flash 社群中最受尊敬的開發者之一——涵蓋了您需要了解的新 ActionScript 語言及其在網路上製作電影、動畫和應用程式的方法論。Moock 以其標誌性的易懂風格和專業知識引導讀者進入這個重要的新領域。Moock 在整本書中的目標不僅是讓您在日常的 Flash 工作中使用物件導向程式設計;他希望您能夠獲得 OOP 的好處;他希望您能完全理解 ActionScript 2.0。毫無疑問,Moock 是能夠實現這一目標的作者。
《Essential ActionScript 2.0》以語言概述開始,包括物件導向概念、語法和用法的基本知識。對於 OOP 新手來說,將學習基本知識及如何應用其理解。對於熟悉 OOP 的人來說,將利用他們的先前經驗來了解基於 Flash 的 OOP。書的下一部分展示了如何使用 ActionScript 2.0 結構整個應用程式,教您最佳實踐和技術,以構建可擴展、可擴展和穩定的應用程式。接下來,您將通過將物件導向程式設計策略(稱為設計模式)應用於 Flash,探索各種編程情境的多種方法。
經驗豐富的 Flash 開發者和來自其他語言的程式設計師將享受 Moock 在《Essential ActionScript 2.0》中所涵蓋的深度和專業知識。初學者程式設計師將感謝那些經常被高級程式設計書籍忽略的頻繁、低術語的解釋。像往常一樣,Moock 通過與 Macromedia Flash 工程師(包括 ActionScript 2.0 的首席開發者 Rebecca Sun)密切合作,保證質量和準確性。無論您現在是否準備轉向 ActionScript 2.0,或只是評估未來的可能性,您都會在這本書中找到您需要了解的一切。《Essential ActionScript 2.0》是每位 ActionScript 程式設計師必備的書籍。
**目錄:**
前言
序言
第一部分:ActionScript 2.0 語言
1. ActionScript 2.0 概述
- ActionScript 2.0 特性
- Flash Player 7 引入的特性
- Flash MX 2004 版本 2 組件
- Flash Player 6 和 7 中的 ActionScript 1.0 和 2.0
- 讓我們開始 OOP
2. 物件導向 ActionScript
- 程序式編程與物件導向編程
- 物件導向編程的關鍵概念
- 但我該如何應用 OOP?
- 繼續表演!
3. 資料類型與類型檢查
- 為什麼使用靜態類型?
- 類型語法
- 相容類型
- 內建動態類別
- 繞過類型檢查
- 類型轉換
- 內建類別的資料類型資訊
- ActionScript 2.0 類型檢查的陷阱
- 接下來:創建類別——您自己的資料類型!
4. 類別
- 定義類別
- 建構函數(第一部分)
- 屬性
- 方法
- 建構函數(第二部分)
- 完成 Box 類別
- 將理論付諸實踐
5. 創建 ActionScript 2.0 類別
- 類別創建快速入門
- 設計 ImageViewer 類別
- ImageViewer 實作(第一部分)
- 在電影中使用 ImageViewer
- ImageViewer 實作(第二部分)
- ImageViewer 實作(第三部分)
- 回到教室
6. 繼承
- 繼承入門
- 子類別作為子類型
- 一個 OOP 聊天範例
- 覆寫方法和屬性
- 子類別中的建構函數
- 子類別化內建類別
- 擴展內建類別和物件
- 繼承的理論
- 不支援抽象類別和最終類別
- 讓我們嘗試繼承
7. 創建 ActionScript 2.0 子類別
- 擴展 ImageViewer 的功能
- ImageViewerDeluxe 骨架
- 添加 setPosition() 和 setSize() 方法
- 自動調整 Image Viewer
- 使用 ImageViewerDeluxe
- 繼續前進
8. 介面
- 介面的必要性
- 介面和多資料類型類別
- 介面語法和用法
- 使用介面的多重類型繼承
- 接下來,包
9. 包
- 包語法
- 定義包
- 包存取和類別路徑
- 在 ActionScript 1.0 中模擬包
- 再多一點理論
10. 異常
- 異常處理循環
- 處理多種類型的異常
- 異常冒泡
- finally 區塊
- 嵌套異常
- try/catch/finally 中的控制流變更
- ActionScript 2.0 中異常處理的限制
- 從概念到程式碼
第二部分:應用程式開發
11. OOP 應用程式框架
- 基本目錄結構
- Flash 文件 (.fla 檔案)
- 類別
- 文件時間軸
- 匯出的 Flash 動畫 (.swf 檔案)
- Flash MX Professional 2004 中的專案
- 讓我們看看它的運作!
12. 使用 ActionScript 2.0 的元件
- 貨幣轉換器應用程式概述
- 準備 Flash 文件
- CurrencyConverter 類別
- 處理元件事件
- 元件完成
13. MovieClip 子類別
- MovieClip 子類別的二元性
- Avatar:一個 MovieClip 子類別範例
- Avatar:組合版本
- 嵌套資產的問題
- 關於 MovieClip 子子類別的說明
- 越來越奇妙
14. 分發類別庫
- 共享類別源檔
- 共享類別而不共享源檔
- 解決真實的 OOP 問題
第三部分:ActionScript 2.0 中的設計模式範例
15. 設計模式介紹
- 讓我們來看看模式
16. 觀察者設計模式
- 在 ActionScript 2.0 中實現觀察者
- Logger:完整的觀察者範例
- 觀察者的記憶體管理問題
- 超越觀察者
17. 單例設計模式
- 在 ActionScript 2.0 中實現單例
- Logger 類中的單例模式
- 單例與類方法和類屬性的比較
- 警告:單例不應作為全域變數
- 進入使用者介面
18. 模型-視圖-控制器設計模式
- MVC 的一般架構
- 一個通用的 MVC 實作
- 一個 MVC 時鐘
- 進一步探索
19. 代理事件模型
- 結構和參與者
- 邏輯流程
- 核心實作
- NightSky:一個代理事件模型範例
- ActionScript 中的其他事件架構
- 從某個地方到另一個地方
第四部分:附錄
A. ActionScript 2.0 語言快速參考
B. 與 ECMAScript 第四版的差異
索引