没有合适的资源?快使用搜索试试~ 我知道了~
Foundation ActionScript 3.0 with Flash CS3 and Flex
需积分: 9 2 下载量 17 浏览量
2009-10-12
10:30:56
上传
评论
收藏 6.05MB PDF 举报
温馨提示
试读
578页
Adobe ActionScript 2008 - Foundation ActionScript 3.0 with Flash CS3 and Flex 2008.pdf
资源详情
资源评论
资源推荐
Foundation ActionScript 3.0
with Flash CS3 and Flex
Steve Webster, Todd Yard, and Sean McSharry
8156fm.qxd 11/12/07 11:29 AM Page i
Lead Editors
Ben Renow-Clarke, Chris Mills, and Matthew Moodie
Technical Reviewer
Mike Jones
Editorial Board
Steve Anglin, Ewan Buckingham, Tony Campbell,
Gary Cornell, Jonathan Gennick, Jason Gilmore, Kevin Goff,
Jonathan Hassell, Matthew Moodie, Joseph Ottinger,
Jeffrey Pepper, Ben Renow-Clarke, Dominic Shakeshaft,
Matt Wade, Tom Welsh
Senior Project Manager
Tracy Brown Collins
Senior Copy Editor
Marilyn Smith
Associate Production Director
Kari Brooks-Copony
Senior Production Editor
Laura Cheu
Compositor
Molly Sharp, ContentWorks
Artist
Kinetic Publishing Services, LLC
Proofreader
Nancy Riddiough
Indexer
Carol Burbo
Cover Image Designer
Corné van Dooren
Interior and Cover Designer
Kurt Krames
Manufacturing Director
Tom Debolski
Foundation ActionScript 3.0 with Flash CS3 and Flex
Copyright © 2008 by Steve Webster, Todd Yard, and Sean McSharry
All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical,
including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the
copyright owner and the publisher.
ISBN-13 (pbk): 978-1-59059-815-3
ISBN-10 (pbk): 1-59059-815-6
ISBN-13 (electronic): 978-1-4302-0196-0
ISBN-10 (electronic): 1-4302-0196-7
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name,
we use the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
Distributed to the book trade worldwide by Springer-Verlag New York, Inc., 233 Spring Street, 6th Floor, New York, NY 10013. Phone
1-800-SPRINGER, fax 201-348-4505, e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com.
For information on translations, please contact Apress directly at 2855 Telegraph Avenue, Suite 600, Berkeley, CA 94705. Phone
510-549-5930, fax 510-549-5939, e-mail info@apress.com, or visit www.apress.com.
The information in this book is distributed on an “as is” basis, without warranty. Although every precaution has been taken in the
preparation of this work, neither the author(s) nor Apress shall have any liability to any person or entity with respect to any loss or
damage caused or alleged to be caused directly or indirectly by the information contained in this work.
The source code for this book is freely available to readers at www.friendsofed.com in the Downloads section.
Credits
8156fm.qxd 11/12/07 11:29 AM Page ii
To Audrey, who has unwittingly served as a model for nearly every photo
I’ve put into a book for the past three years. Thanks for taking a great
picture and understanding why Daddy needs to work sometimes
instead of jumping around like a bunny.
—Todd Yard
To Mary: Thank you for being so patient with me and bringing up our kids
while I work 24 hours a day. I’m not going to do this again . . . for a while.
To my boys Aston and Jack: I promise you will finally get to see Daddy’s face
again, and yes, we can go to the beach and play golf again.
To Isabelle, my new baby daughter: Welcome to the world. It’s an amazing,
bright, boundless place, and you have made it more so.
You have all given me the strength to do so much over the last year.
I love you all very much and promise I will go to bed every night from now on.
And finally . . . Mary, will you marry me?
. . . and finally make our children respectable?
—Sean McSharry
8156fm.qxd 11/12/07 11:29 AM Page iii
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
About the Cover Image Designer
. . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Chapter 1 Getting Started with ActionScript 3.0
. . . . . . . . . . . . . . . . . 3
Chapter 2 ActionScript 3.0 Fundamentals
. . . . . . . . . . . . . . . . . . . . . 25
Chapter 3 Objects and classes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Chapter 4 Working with the Display
. . . . . . . . . . . . . . . . . . . . . . . . . 109
Chapter 5 Creating Vector Graphics with the Drawing API
. . . . . . . 163
Chapter 6 User Interaction and More with Events
. . . . . . . . . . . . . 193
Chapter 7 Working with Video
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
Chapter 8 Using Audio
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Chapter 9 Working with Components
. . . . . . . . . . . . . . . . . . . . . . . 345
Chapter 10 Regular Expressions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
Chapter 11 Using XML
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
Chapter 12 Case Study: Creating a Dynamic Image Viewer
. . . . . . 435
Chapter 13 Getting Started with Flex 2
. . . . . . . . . . . . . . . . . . . . . . 469
Chapter 14 Flex by Example
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491
Index
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 550
v
CONTENTS AT A GLANCE
8156fm.qxd 11/12/07 11:29 AM Page v
About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
About the Technical Reviewer
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
About the Cover Image Designer
. . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Chapter 1 Getting Started with ActionScript 3.0
. . . . . . . . . . . . . . . . . 3
A brief history of ActionScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Flash CS3 and Flex 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
ActionScript and object-oriented programming . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
The development process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Organizing your files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Adding ActionScript to your projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Placing code on the timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Importing code from an external file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Specifying a document class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Linking library assets to external classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Bouncing balls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Creating the Flash file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Creating the Ball class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Adding more balls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
ActionScript in action. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Chapter 2 ActionScript 3.0 Fundamentals . . . . . . . . . . . . . . . . . . . . . 25
Statements and expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Introducing variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Assigning a value to a variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Retrieving the value of a variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Naming your variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Understanding data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Boolean data type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Numeric data types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
vii
CONTENTS
8156fm.qxd 11/12/07 11:29 AM Page vii
剩余577页未读,继续阅读
kuemacn
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 《2024音视频技术发展报告》,由LiveVideoStack出品,旨在深入了解流媒体和RTC(实时通信技术)的从业情情况
- 2023-04-06-项目笔记 - 第一百二十五阶段 - 4.4.2.123全局变量的作用域-123 -2024.05.06
- MATLAB编程高效实战:涵盖核心数学、科学计算、数据可视化及算法应用,助力工程师与研究人员的必备函数代码集
- halcon 3D图像重建
- 现有student.txt和student-score.txt 将两个文件上传到hdfs上 使用Map/Reduce框架完成下面
- 测试数据如下 1)文件一:data01.txt,内容:Beijing is beautiful I love Beijing
- 1_notepad_share_encrypt.hdoc..bin
- 基于混合遗传算法的三维装箱问题分析-数学建模
- 2023-04-06-项目笔记 - 第一百二十五阶段 - 4.4.2.123全局变量的作用域-123 -2024.05.06
- DSGW-211规格书 EnOcean网关
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0