did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780596526955

Actionscript 3.0 Cookbook

by
  • ISBN13:

    9780596526955

  • ISBN10:

    0596526954

  • Format: Paperback
  • Copyright: 2006-10-01
  • Publisher: Adobe Developer Library
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99 Save up to $4.00
  • Buy New
    $38.79
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

ActionScript 3 Cookbook helps developers work with the language right away. Rather than focus on ActionScript in the abstract, the book puts theory into practice with ready- made answers to common problems. Readers will find more than 300 worked-out scripts they can use to solve a wide range of coding dilemmas, while learning practical techniques for resolving similar issues in the future. Each recipe includes a discussion that explains how it works and why. The Cookbook progresses from short recipes for small problems to longer, more complex scripts for thornier riddles. Developers can even learn to link modular ActionScript pieces together to create rock-solid solutions for Flash applications. This is the first ActionScript 3 title for developers that will include Learning ActionScript 3, ActionScript 3: The Definitive Guide, and Essential ActionScript 3. All four books will feature cross references as appropriate, so users can easily find more extensive discussions of tangential topics.

Author Biography

Joey Lott is the author of several O'Reilly books on Macromedia technology, including Flash 8 Cookbook, Programming Flash Communication Server, and the ActionScript Cookbook. He is also the author of Flash 8 ActionScript Bible (Wiley) and Advanced ActionScript with Design Patterns (Adobe Press, October 2006). Joey has been teaching Flash and ActionScript since 1999. His professional experience in the Internet industry includes co-founding RightSpring, Inc., as well as consulting for YourMobile/Premium Wireless Services (J2EE B2C application) and Ads.com (leading the development of a J2EE B2B application).

Darron Schall is an independent consultant specializing in the Flash Platform, with a Bachelor's Degree in Computer Science from Lehigh University. He has been using ActionScript since the early days and is a prominent voice in the Flash and Flex communities. He is actively involved in the Open Source Flash movement with projects ranging from software development tools to a Commodore 64 emulator. Darron has spoken at various conferences about ActionScript, and has contributed to books and magazines. You can find his Flash Platform related weblog at http://www.darronschall.com.

Keith Peters is a Flash developer in the Boston area. He has been working with Flash since 1999 and is currently a Senior Flash Developer at Brightcove (http://www.brightcove.com). Keith has been a contributing author to nine other books on Flash and ActionScript. His personal website, http://www.bit-101.com, features an active blog, over 700 open source Flash experiments, and lots of other random Flash-related stuff.

Table of Contents

Preface xvii
ActionScript Basics
1(42)
Creating an ActionScript Project
2(1)
Customizing the Properties of an Application
3(1)
Where to Place ActionScript Code
4(4)
How to Trace a Message
8(2)
Handling Events
10(2)
Responding to Mouse and Key Events
12(2)
Using Mathematical Operators
14(2)
Checking Equality or Comparing Values
16(3)
Performing Actions Conditionally
19(5)
Performing Complex Conditional Testing
24(2)
Repeating an Operation Many Times
26(4)
Repeating a Task over Time
30(2)
Creating Reusable Code
32(2)
Generalizing a Method to Enhance Reusability
34(2)
Exiting a Method
36(1)
Obtaining the Result of a Method
37(1)
Handling Errors
38(5)
Custom Classes
43(15)
Creating a Custom Class
43(5)
Determining Where to Save a Class
48(1)
Creating Properties That Behave As Methods
49(2)
Creating Static Methods and Properties
51(1)
Creating Subclasses
52(2)
Implementing Subclass Versions of Superclass Methods
54(2)
Creating Constants
56(1)
Dispatching Events
57(1)
Runtime Environment
58(16)
Detecting the Player Version
58(2)
Detecting the Operating System
60(1)
Checking the Player Type
61(1)
Checking the System Language
61(2)
Detecting Display Settings
63(2)
Scaling the Movie
65(1)
Changing the Alignment
66(1)
Hiding the Flash Player's Menu Items
67(1)
Detecting the Device's Audio Capabilities
68(1)
Detecting the Device's Video Capabilities
69(1)
Prompting the User to Change Player Settings
70(1)
Dealing with System Security
71(3)
Numbers and Math
74(29)
Representing Numbers in Different Bases
74(1)
Converting Between Different Number Systems
75(2)
Rounding Numbers
77(2)
Inserting Leading or Trailing Zeros or Spaces
79(4)
Formatting Numbers for Display Without a Mask
83(1)
Formatting Currency Amounts
84(2)
Generating a Random Number
86(2)
Simulating a Coin Toss
88(3)
Simulating Dice
91(2)
Simulating Playing Cards
93(2)
Generating a Unique Number
95(1)
Converting Angle Measurements
96(1)
Calculating the Distance Between Two Points
97(1)
Determining Points Along a Circle
98(3)
Converting Between Units of Measurement
101(2)
Arrays
103(34)
Adding Elements to the Start or End of an Array
104(2)
Looping Through an Array
106(1)
Searching for Matching Elements in an Array
107(4)
Removing Elements
111(2)
Inserting Elements in the Middle of an Array
113(1)
Converting a String to an Array
114(1)
Converting an Array to a String
115(1)
Creating a Separate Copy of an Array
116(4)
Storing Complex or Multidimensional Data
120(3)
Sorting or Reversing an Array
123(4)
Implementing a Custom Sort
127(2)
Randomizing the Elements of an Array
129(2)
Getting the Minimum or Maximum Element
131(1)
Comparing Arrays
131(2)
Creating an Associative Array
133(2)
Reading Elements of an Associative Array
135(2)
Display List
137(44)
Adding an Item to the Display List
141(5)
Removing an Item from the Display List
146(3)
Moving Objects Forward and Backward
149(4)
Creating Custom Visual Classes
153(3)
Creating Simple Buttons
156(5)
Loading External Images at Runtime
161(4)
Loading and Interacting with External Movies
165(3)
Creating Mouse Interactions
168(5)
Dragging and Dropping Objects with the Mouse
173(8)
Drawing and Masking
181(19)
Setting a Line Style
182(1)
Setting Gradient Line Styles
183(1)
Drawing a Line
184(2)
Drawing a Curve
186(1)
Drawing an Arc
187(1)
Drawing a Rectangle
187(2)
Drawing a Circle
189(1)
Drawing an Ellipse
190(1)
Drawing a Triangle
191(1)
Drawing Regular Polygons
192(1)
Drawing a Star
193(1)
Filling a Shape with a Solid or Translucent Color
194(1)
Filling a Shape with a Gradient
195(2)
Filling a Shape with a Bitmap
197(1)
Scripting Masks
198(2)
Bitmaps
200(29)
Creating a BitmapData Object
201(1)
Adding a Bitmap to the Display List
202(1)
Drawing a Display Object to a Bitmap
203(1)
Loading an External Image into a Bitmap
204(1)
Manipulating Pixels
205(2)
Creating Rectangular Fills
207(1)
Creating a Flood Fill
208(1)
Copying Pixels
209(2)
Copying Channels
211(1)
Creating Noise
212(2)
Creating Perlin Noise
214(4)
Using Threshold
218(3)
Applying a Filter to a Bitmap
221(3)
Dissolving Between Two Bitmaps
224(3)
Scrolling a Bitmap
227(2)
Text
229(37)
Creating an Outline Around a Text Field
230(1)
Creating a Background for a Text Field
230(1)
Making a User Input Field
231(1)
Making a Password Input Field
232(1)
Filtering Text Input
233(1)
Setting a Field's Maximum Length
234(1)
Displaying Text
235(1)
Displaying HTML-Formatted Text
235(1)
Condensing Whitespace
236(1)
Sizing Text Fields to Fit Contents
237(1)
Scrolling Text Programmatically
238(3)
Responding to Scroll Events
241(1)
Formatting Text
242(5)
Formatting User-Input Text
247(1)
Formatting a Portion of Existing Text
248(1)
Setting a Text Field's Font
249(1)
Embedding Fonts
250(2)
Creating Text That Can Be Rotated
252(1)
Displaying Unicode Text
252(1)
Assigning Focus to a Text Field
253(1)
Selecting Text with ActionScript
254(1)
Setting the Insertion Point in a Text Field
255(1)
Responding When Text Is Selected or Deselected
256(1)
Responding to User Text Entry
257(1)
Adding a Hyperlink to Text
258(2)
Calling ActionScript from Hyperlinks
260(1)
Working with Advanced Text Layout
261(3)
Applying Advanced Anti-Aliasing
264(1)
Replacing Text
265(1)
Retrieving a List of System Fonts
265(1)
Filters and Transforms
266(15)
Applying Color Changes
266(1)
Applying Color Tints
267(1)
Resetting Color
268(1)
Shearing
269(1)
Applying Basic Filters
269(3)
Applying Advanced Filter Effects (Emboss, etc.)
272(2)
Embossing
274(1)
Detecting Edges
275(1)
Sharpening
276(1)
Making a Digital Negative
276(1)
Applying Grayscale
277(1)
Changing Saturation
278(1)
Changing Brightness
278(1)
Changing Contrast
279(2)
Programmatic Animation
281(17)
Moving an Object
282(1)
Moving an Object in a Specific Direction
283(2)
Easing
285(2)
Acceleration
287(2)
Springs
289(2)
Using Trigonometry
291(3)
Applying Animation Techniques to Other Properties
294(4)
Strings
298(29)
Joining Strings
298(4)
Using Quotes and Apostrophes in Strings
302(1)
Inserting Special Whitespace Characters
303(1)
Searching for a Substring
304(4)
Extracting a Substring
308(3)
Parsing a String into Words
311(4)
Removing and Replacing Characters and Words
315(2)
Retrieving One Character at a Time
317(2)
Converting Case
319(1)
Trimming Whitespace
320(2)
Reversing a String by Word or by Character
322(1)
Converting Between Strings and Unicode or ASCII
323(4)
Regular Expressions
327(21)
Understanding Regular Expression Patterns
328(5)
Testing Regular Expressions
333(3)
Looking for Pattern Matches
336(2)
Removing and Replacing Characters and Words Using Patterns
338(3)
Creating a Nongreedy Pattern
341(2)
Validating User Input with Common Patterns
343(5)
Dates and Times
348(17)
Finding the Current Date and Time
348(3)
Retrieving the Date Values
351(1)
Retrieving the Day or Month Name
352(1)
Formatting the Date and Time
353(2)
Formatting Seconds or Milliseconds as Minutes and Seconds
355(1)
Converting Between DMYHMSM and Epoch Milliseconds
356(1)
Using Timers
357(1)
Calculating Elapsed Time or Intervals Between Dates
358(5)
Parsing a Date from a String
363(2)
Programming Sound
365(27)
Creating a Sound Object and Loading a Sound
365(2)
Starting and Stopping a Sound
367(1)
Setting the Buffer for a Sound
368(1)
Offsetting the Start of a Sound
369(1)
Playing a Sound Multiple Times (Looping)
370(1)
Getting the Size of a Sound File
371(2)
Reading the ID3 Tag of a Sound File
373(2)
Find Out When a Sound Finishes Playing
375(2)
Tracking the Progress of a Playing Sound
377(2)
Pausing and Restarting a Sound
379(2)
Reading the Level of a Sound
381(1)
Stopping All Sounds
382(1)
Reading the Sound Spectrum
383(2)
Changing the Volume or Pan of a Sound
385(1)
Creating a Sound Application
386(6)
Video
392(17)
Loading and Playing Back Video
392(2)
Controlling Video Sound
394(1)
Reading Playback Time
394(1)
Reading Video Duration
395(2)
Controlling Playback Time
397(1)
Scaling Video
398(1)
Managing and Monitoring Buffering and Loading
399(1)
Listening for Cue Points
400(1)
Applying Filters to Video
401(1)
Pausing and Resuming Video
402(1)
Stopping Video
402(1)
Scrubbing Video
403(2)
Clearing the Video Display
405(1)
Determining User Bandwidth
405(4)
Storing Persistent Data
409(13)
Creating and Opening a Local Shared Object
409(2)
Writing Data to a Shared Object
411(1)
Saving a Local Shared Object
411(3)
Reading Data from a Shared Object
414(1)
Removing Data from a Shared Object
415(1)
Serializing Custom Classes
416(2)
Sharing Data Between Flash Applications
418(2)
Controlling the Size of Local Shared Objects
420(2)
Communicating with Other Movies
422(13)
Creating Local Connections
423(4)
Sending Data
427(3)
Validating Receipt of Communication over Local Connections
430(2)
Accepting Local Communications from Other Domains
432(3)
Sending and Loading Data
435(17)
Loading Variables from a Text File
436(4)
Loading Variables from a Server-Side Script
440(2)
Loading a Block of Text (Including HTML and XML)
442(2)
Checking Load Progress
444(2)
Accessing Data Being Downloaded
446(1)
Sending Data to a Server-Side Script
447(2)
Sending Variables and Handling a Returned Result
449(3)
XML
452(35)
Understanding XML Structure (Reading and Writing XML)
454(2)
Creating an XML Object
456(2)
Adding Elements to an XML Object
458(3)
Adding Text Nodes to an XML Object
461(2)
Adding Attributes to an XML Element
463(1)
Reading Elements in an XML Tree
464(1)
Finding Elements by Name
465(3)
Reading Text Nodes and Their Values
468(2)
Reading an Element's Attributes
470(3)
Removing Elements, Text Nodes, and Attributes
473(1)
Loading XML
474(1)
Loading XML from Different Domains
475(1)
Sending XML
476(6)
Searching XML
482(3)
Using HTML and Special Characters in XML
485(2)
Web Services and Flash Remoting
487(7)
Calling Web Services Methods
488(1)
Handling Web Services Responses
489(1)
Handling Web Services Errors
490(1)
Calling Flash Remoting Methods
490(2)
Handling Flash Remoting Responses
492(2)
Building Integrated Applications
494(5)
Calling JavaScript Functions
494(1)
Calling ActionScript Functions
495(2)
Passing Parameters from HTML
497(2)
File Management
499(10)
Downloading Files
499(3)
Detecting When a User Selects a File to Upload
502(1)
Monitoring Download Progress
503(1)
Browsing for Files
503(1)
Filtering Files That Display in the Browser Window
504(2)
Detecting When the User Has Selected a File to Upload
506(1)
Uploading Files
506(1)
Monitoring File Upload Progress
507(2)
Socket Programming
509(18)
Connecting to a Socket Server
510(3)
Sending Data
513(2)
Receiving Data
515(4)
Handshaking with a Socket Server
519(4)
Disconnecting from a Socket Server
523(1)
Handling Socket Errors
524(3)
Appendix. Unicode Escape Sequences for Latin 1 Characters 527(6)
Index 533

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program