Atnaujinkite slapukų nuostatas

El. knyga: Foundation ActionScript 3

  • Formatas: PDF+DRM
  • Išleidimo metai: 02-Dec-2014
  • Leidėjas: APress
  • Kalba: eng
  • ISBN-13: 9781484205839
Kitos knygos pagal šią temą:
  • Formatas: PDF+DRM
  • Išleidimo metai: 02-Dec-2014
  • Leidėjas: APress
  • Kalba: eng
  • ISBN-13: 9781484205839
Kitos knygos pagal šią temą:

DRM apribojimai

  • Kopijuoti:

    neleidžiama

  • Spausdinti:

    neleidžiama

  • El. knygos naudojimas:

    Skaitmeninių teisių valdymas (DRM)
    Leidykla pateikė šią knygą šifruota forma, o tai reiškia, kad norint ją atrakinti ir perskaityti reikia įdiegti nemokamą programinę įrangą. Norint skaityti šią el. knygą, turite susikurti Adobe ID . Daugiau informacijos  čia. El. knygą galima atsisiųsti į 6 įrenginius (vienas vartotojas su tuo pačiu Adobe ID).

    Reikalinga programinė įranga
    Norint skaityti šią el. knygą mobiliajame įrenginyje (telefone ar planšetiniame kompiuteryje), turite įdiegti šią nemokamą programėlę: PocketBook Reader (iOS / Android)

    Norint skaityti šią el. knygą asmeniniame arba „Mac“ kompiuteryje, Jums reikalinga  Adobe Digital Editions “ (tai nemokama programa, specialiai sukurta el. knygoms. Tai nėra tas pats, kas „Adobe Reader“, kurią tikriausiai jau turite savo kompiuteryje.)

    Negalite skaityti šios el. knygos naudodami „Amazon Kindle“.

ActionScript 3 is a full-fledged programming language, with complete object-oriented capabilities, event handling, sound and video support, drawing capabilities, support for regular expressions, and much more.

Whether you are just starting out on the road to computer programming and animation or an experienced developer who wants to learn a new language, you’ll find all you need to know inFoundation ActionScript 3.

Starting with the fundamentals, you’ll learn how to add interactivity to your Flash movies by using ActionScript objects, manipulating sound and video, and harnessing the power of regular expressions and XML. The book concludes with two case studies to consolidate what you’ve learned and introduce some additional advanced techniques. You’ll gain a solid understanding of the exciting world of ActionScript 3 and see how everything fits together, so you’ll be able to build your own professional applications.

The sensible layout of the book makes it easy to find information about specific techniques. It focuses on the essential skills that will enable you to get up and running quickly. With this book as your guide, you’ll be creating killer Flash applications before you know it.

About the Authors xvii
About the Technical Reviewer xix
Layout Conventions xxi
Chapter 1 Getting Started with ActionScript 3.0
1(22)
A Brief History of ActionScript
1(1)
The Rise of ActionScript 3.0
2(1)
ActionScript and Object-Oriented Programming
3(1)
The Development Process
4(2)
Organizing Your Files
6(1)
Adding ActionScript to Your Projects
7(1)
Placing Code on the Timeline
7(2)
Importing Code from an External File
9(2)
Specifying a Document Class
11(1)
Linking Library Assets to External Classes
12(3)
Bouncing Balls
15(1)
Creating the Flash File
15(2)
Creating the Ball Class
17(2)
Adding More Balls
19(2)
ActionScript in Action
21(1)
Summary
21(2)
Chapter 2 ActionScript 3.0 Fundamentals
23(44)
Statements and Expressions
24(1)
Introducing Variables
25(1)
Assigning a Value to a Variable
25(1)
Retrieving the Value of a Variable
26(2)
Naming Your Variables
28(1)
Understanding Data Types
29(3)
Using Constants
32(1)
Performing Operations
32(1)
Arithmetic Operators
33(1)
Specifying Precedence
34(1)
String Operations
34(1)
Unary Operations
35(1)
Introducing Arrays
36(2)
Manipulating Arrays
38(1)
Vectors vs Arrays
39(2)
Understanding Type Checking
41(1)
Making Decisions
41(1)
Introducing the if Statement
41(2)
Forming Boolean Expressions
43(1)
Booleans in Conditionals
44(1)
Using Logical Operators
45(2)
Looping the Loop
47(1)
The while loop
47(3)
The do... while loop
50(1)
The for Loop
50(1)
Looping through an Array
51(1)
More for Loops
52(1)
Breaking Out of a Loop
52(1)
Looping through a Vector
53(1)
Introducing Functions
53(1)
Creating a Function
54(1)
Returning a Value from a Function
55(2)
Using Function Parameters
57(1)
Providing a Default Value for Function Parameters
58(1)
Allowing for Variable Parameters
59(1)
Passing Values and References
60(2)
Function Scope
62(1)
Commenting Your Code
63(1)
Bad vs. Good Comments
64(1)
Commenting for Documentation
64(1)
Summary
65(2)
Chapter 3 Objects and Classes
67(34)
iPod Analogy
67(1)
Working with Objects
68(1)
Creating Objects using the New Operator
68(1)
Accessing Properties and Calling Methods
69(1)
Copying Objects
70(1)
Casting Objects to a Type
71(2)
The Object Object
73(1)
Iterating Over Objects
74(2)
Dictionaries vs Objects
76(1)
Native JSON
77(1)
Creating Your First Class
77(2)
Choosing Suitable Names for your Classes
79(1)
Adding Properties
79(2)
Adding Methods
81(3)
Initializing Your Objects with a Constructor Method
84(1)
Controlling Access to Properties and Methods
85(2)
Adding Getter/Setter Methods
87(3)
Creating Read-Only Properties with Getter Methods
90(1)
Static Properties and Methods
90(1)
Taking Advantage of Inheritance
91(4)
Overriding Methods of the Base Class
95(1)
Using Packages to Group Your Classes
96(1)
Naming Your Packages
97(2)
Importing a Class from a Package
99(1)
Importing all Classes in a Given Package
99(1)
Resolving Naming Conflicts among Imported Classes
99(1)
Removing Dependency on Timeline Code
100(1)
Summary
100(1)
Chapter 4 Working with the Display
101(50)
Introducing the Display List
101(4)
Working with Display Objects
105(4)
Manipulating Display Objects
109(4)
Managing Depth
113(6)
Creating new Display Objects
119(1)
Removing Display Objects from the Display List
120(1)
Specifying BI Modes
121(1)
Working with Filters
122(1)
Applying a Filter to a Display Object
123(4)
Applying Filters in a Specific Order
127(2)
Making Changes to an Existing Filter
129(3)
Removing an Existing Filter
132(2)
Introducing the Advanced Filters
134(1)
Accessing the Stage
135(1)
Using Stage Properties
135(1)
Making a Movie Full Screen
136(5)
Using Library Resources
141(2)
Loading from External Files
143(1)
Loading an External Asset
143(2)
Manipulating the Loaded Asset
145(1)
Making Things Move
146(1)
Copying Animation from the Timeline
146(4)
Animating other Properties
150(1)
Summary
150(1)
Chapter 5 Creating Vector Graphics with the Drawing API
151(34)
Why we Need a Drawing API
151(2)
Understanding the Drawing API
153(1)
Setting up Mr. Smiley
154(2)
Drawing Lines
156(1)
Creating Straight Lines
156(2)
Controlling the Line Style
158(2)
Drawing Curved Lines
160(1)
Drawing and Filling Shapes
161(1)
Drawing Primitive Shapes
161(3)
Creating Custom Shapes
164(1)
Filling Shapes with a Solid Color
165(2)
Filling Shapes with Color Gradients
167(5)
Simplifying the Code
172(2)
Creating Gradient line Styles
174(5)
Flash 3D
179(4)
Summary
183(2)
Chapter 6 User Interaction and More with Events
185(38)
Understanding Events
185(1)
Listening for an Event
186(1)
Removing an Event Listener
187(1)
Naming Your Event Listener Methods
188(1)
Creating a Simple Drawing Application
188(6)
Using One Event Listener for Multiple Objects
194(1)
Using Events with the Display List
195(1)
Handling Single and Double Mouse Clicks
195(4)
Handling Mouse Hover States
199(6)
Handling Key Presses
205(9)
Preventing an Event's Default Action
214(4)
Capturing and Bubbling: The Event Flow
218(1)
Listening for Events in the Bubble Phase
219(1)
Listening for Events in the Capture Phase
219(1)
Stopping an Event from Propagating
220(1)
Removing Capture Phase Event Listeners
221(1)
Summary
221(2)
Chapter 7 Working with Video
223(48)
Video on the Modern Web
223(1)
The Video Experience
223(1)
Where ActionScript Comes in
224(1)
Encoding Your Video
225(1)
Capturing Your Video
225(2)
Using the Flash Video Encoder
227(4)
Delivering Your Video
231(3)
Using ActionScript to Play Videos
234(1)
Managing Connections with the NetConnectlon Class
234(2)
Loading and Controlling Video with the NetStream Class
236(3)
Creating Video Objects with the Video Class
239(1)
Creating Camera Objects with the Camera Class
240(2)
Handling Video Events
242(4)
Building a Video Player
246(2)
Setting up the Project
248(4)
Controlling the Video Player
252(5)
Controlling the Video on the Stage
257(13)
Creating a Custom Event
270(1)
Summary
270(1)
Chapter 8 Using Audio
271(48)
Importing and Converting Sound Files
271(1)
Using iTunes
271(3)
Using Adobe Audition
274(1)
Using ActionScript to Play Sound
274(1)
Accessing Sound Files with the Sound Class
275(1)
Controlling Sound Channels with the SoundChannel Class
276(1)
Doing Security Checks with the SoundLoaderContext Class
276(1)
Controlling Volume and Panning with the SoundTransform Class
276(1)
Controlling Sounds Globally with the SoundMixer Class
277(1)
Getting ID3 Data with the ID3Info Class
277(1)
Using a Microphone with the Microphone Class
278(1)
Understanding the Basics of a Sound Player Application
279(10)
Building a Sound Player
289(1)
Setting up the Project
290(5)
Adding Display Items
295(4)
Controlling the Audio as it Plays
299(9)
Controlling the Sound Volume and Panning
308(10)
Creating the Custom Event Class
318(1)
Summary
318(1)
Chapter 9 Working with Components
319(50)
Just What are Components?
319(1)
Accessing Your Components
320(2)
Adjusting Component Parameters
322(3)
Benefits of Working with Components
325(1)
Exploring the Flash Component Framework
326(1)
UI Components
326(2)
Video Components
328(2)
Going Behind the Scenes
330(2)
Finding the Files
332(7)
Scripting Interaction
339(1)
Adding the Components
339(2)
Adding the ActionScript
341(5)
Styling and Skinning
346(1)
Styling Components
346(3)
Skinning using the Timeline
349(4)
Skinning using Classes
353(4)
Creating Components from Scratch
357(1)
Creating the Widget
357(2)
Writing the Component Code
359(6)
Turning the Symbol into a Component
365(1)
Testing the Component
366(2)
Using Third-Party Components
368(1)
Summary
368(1)
Chapter 10 Regular Expressions
369(22)
Why you Need Regular Expressions
369(2)
Introducing the RegExp Class
371(1)
Anatomy of a Regular Expression Pattern
372(1)
Introducing Metacharacters
373(2)
Providing Alternatives with Alternation
375(1)
Using Character Classes and Character Ranges
375(1)
Matching any Character using the Dot Metacharacter
376(1)
Matching a Number of Occurrences Using Quantifiers
377(3)
Grouping Patterns
380(1)
Accessing Matched Strings with Backreferences
381(2)
Understanding the E-Mail Regular Expression-Pattern
383(1)
Changing Regular Expression Behavior with-Modifiers
384(1)
Using the Case-Insensitive Modifier
385(1)
Using the Global Modifier
385(2)
Using the Multiline Modifier
387(1)
Using the Dotall Modifier
387(1)
Using the Extended Modifier
387(1)
Using Variables to Build a Regular Expression
388(1)
Useful Regular Expressions
388(1)
Regular Expression Resources
389(1)
Summary
389(2)
Chapter 11 Using XML
391(16)
Understanding XML and E4X
391(1)
XML Document Components
392(1)
E4X
393(1)
Accessing an XML File
393(1)
Creating an XML Object
394(1)
Loading an XML File
394(2)
Getting XML from a Remote Source
396(1)
Reading the XML
396(1)
Reading the Root Node
396(1)
Reading Elements in an XML Tree
396(1)
Reading an XML Element's Attributes
397(1)
Searching XML
398(1)
Searching for an Attribute or Element at any Level
399(2)
Reading Text Nodes
401(1)
Modifying XML
402(1)
Adding Elements to an XML Object
402(3)
Removing Elements and Attributes from an XML Object
405(1)
Summary
405(2)
Chapter 12 Case Study: Creating a Dynamic Image Viewer
407(34)
An Overview of the Image Viewer
408(1)
Laying out the Interface
409(5)
Creating the Document Class
414(5)
Loading Image Data
419(2)
Loading the XML
421(1)
Parsing the Data
422(2)
Accessing the Data
424(1)
Displaying Images
425(3)
Handling Image Selection
428(1)
Scaling an Image
429(1)
Adding Graphic Enhancements
430(1)
Changing the Image Label
430(1)
Improving the Thumbnail Layout
431(2)
Adding Drop Shadows
433(2)
Creating an Animated Transition
435(4)
Summary
439(2)
Chapter 13 Getting Started with Flex
441(22)
Introducing Flex
441(1)
Understanding Rich Internet Applications
441(1)
Meet the (Flex) Family
442(1)
The Flex Framework
442(1)
The Flash Player
442(1)
MXML
442(1)
The Flex Software Development Kit
443(1)
Flash Builder
443(1)
Adobe LiveCycle DS
443(1)
Adobe AIR
444(1)
Getting Started with the Flex SDK
444(1)
Installing the Flex SDK
444(4)
Finding a Suitable Editor
448(1)
Building your first Flex Application
448(4)
Getting Started with Flash Builder
452(1)
Understanding the Flash Builder Interface
452(1)
Building your first Flash Builder Application
453(8)
Summary
461(2)
Chapter 14 Flex by Example
463(56)
Planning the Application
463(1)
Gathering the Requirements
464(1)
Creating the Functional Specification
465(1)
Designing the UI
466(1)
Designing the Interaction
466(1)
Designing the Data and Logic
467(1)
Setting up the Project
467(2)
Creating the Basic UI
469(1)
Creating the Containers
469(1)
Creating Basic Feed Integration
470(1)
Installing the XML Syndication Library
471(4)
Creating the Subscription Class
475(1)
Adding a New Class to Your Project
475(2)
Fleshing out the Subscription Class
477(2)
Testing the Subscription Class
479(1)
Loading the Data
480(4)
Allowing Subscription Instances to be used for Data Binding
484(3)
Creating the Subscriptions List
487(3)
Creating the Articles Data Grid
490(3)
Populating the Article Panel
493(1)
Completing the Subscriptions Panel
494(1)
Allowing Users to Subscribe to a Feed
494(11)
Allowing Users to Unsubscribe from a Feed
505(1)
Saving the Subscriptions List Between Sessions
505(3)
Refreshing the Subscriptions List
508(3)
Completing the Articles and Article Panels
511(1)
Finishing the Articles Panel
511(5)
Finishing the Article Panel
516(2)
Improving the Feed Reader
518(1)
Summary 519(2)
Index 521
Paul Milbourne is an Adobe Certified Expert and instructor for Flash. He has been a Flash platform consultant in the Washington-Baltimore metropolitan area for the better part of a decade. His journey has allowed him to work with such clients as the Washington Redskins, Baltimore Ravens, Democratic National Committee, and many others. For the most part, Paul has made a handsome career cleaning up after other developers. This experience has exposed him to most aspects of Flash development through a multitude of industries. His true passion is the advancement of the Flash community in that area. Paul is the principal and founding member of the Baltimore-Washington Adobe Flash User Group, which boasts more than 300 members. His vision is to unite that community in a collaborative effort, both informationally and vocationally. Paul studies computer science and art at the University of Maryland. And, though he was a professional chef in a former life, he is not responsible for any of the food references in this book!