| Introduction |
|
1 | (4) |
|
|
|
|
|
|
5 | (16) |
|
|
|
5 | (6) |
|
|
|
5 | (1) |
|
|
|
5 | (1) |
|
One Library to Rule Them All |
|
|
6 | (1) |
|
|
|
7 | (1) |
|
|
|
7 | (1) |
|
Object Drawing---The New Grouping |
|
|
8 | (1) |
|
|
|
9 | (1) |
|
|
|
9 | (2) |
|
Welcome Back, Normal Mode |
|
|
11 | (1) |
|
The Fastest Flash Player Ever |
|
|
11 | (1) |
|
|
|
12 | (1) |
|
|
|
12 | (1) |
|
|
|
12 | (2) |
|
|
|
14 | (1) |
|
|
|
15 | (1) |
|
|
|
15 | (1) |
|
|
|
16 | (1) |
|
|
|
17 | (2) |
|
|
|
19 | (1) |
|
|
|
20 | (1) |
|
Getting Started with Flash Professional 8 |
|
|
21 | (26) |
|
Humble Beginnings---Where Flash Came From |
|
|
21 | (1) |
|
|
|
22 | (11) |
|
|
|
23 | (1) |
|
The Properties Inspector Panel |
|
|
24 | (2) |
|
|
|
26 | (6) |
|
|
|
32 | (1) |
|
|
|
33 | (8) |
|
|
|
33 | (3) |
|
The ActionScript and Auto Format Categories |
|
|
36 | (1) |
|
|
|
36 | (2) |
|
|
|
38 | (1) |
|
|
|
39 | (1) |
|
|
|
39 | (2) |
|
|
|
41 | (2) |
|
Making a Better Workspace |
|
|
43 | (3) |
|
|
|
46 | (1) |
|
Creating Graphics in Flash |
|
|
47 | (24) |
|
|
|
47 | (17) |
|
|
|
48 | (1) |
|
|
|
49 | (1) |
|
|
|
50 | (14) |
|
|
|
64 | (2) |
|
|
|
65 | (1) |
|
|
|
65 | (1) |
|
Grouping and Drawing Objects |
|
|
66 | (2) |
|
|
|
66 | (1) |
|
|
|
66 | (2) |
|
|
|
68 | (1) |
|
Importing and Working with Bitmaps |
|
|
68 | (2) |
|
|
|
68 | (1) |
|
|
|
69 | (1) |
|
|
|
70 | (1) |
|
|
|
70 | (1) |
|
|
|
71 | (12) |
|
|
|
71 | (5) |
|
|
|
71 | (2) |
|
|
|
73 | (3) |
|
|
|
76 | (2) |
|
|
|
76 | (2) |
|
|
|
78 | (4) |
|
|
|
78 | (2) |
|
|
|
80 | (2) |
|
|
|
82 | (1) |
|
Symbols, Instances, and the Library |
|
|
83 | (20) |
|
|
|
83 | (1) |
|
|
|
83 | (1) |
|
|
|
84 | (3) |
|
When Should You Use a Graphic? |
|
|
84 | (3) |
|
|
|
87 | (1) |
|
|
|
87 | (5) |
|
|
|
89 | (1) |
|
Memoirs of an Invisible Button |
|
|
90 | (2) |
|
|
|
92 | (2) |
|
|
|
94 | (2) |
|
|
|
96 | (5) |
|
|
|
96 | (1) |
|
|
|
96 | (1) |
|
|
|
97 | (1) |
|
|
|
98 | (2) |
|
|
|
100 | (1) |
|
|
|
101 | (2) |
|
Working with Sound and Video |
|
|
103 | (20) |
|
|
|
103 | (1) |
|
|
|
104 | (2) |
|
Sound in the Properties Inspector |
|
|
106 | (3) |
|
|
|
107 | (1) |
|
|
|
107 | (2) |
|
|
|
109 | (1) |
|
|
|
110 | (2) |
|
|
|
112 | (2) |
|
|
|
114 | (8) |
|
Importing Video into Flash |
|
|
114 | (8) |
|
|
|
122 | (1) |
|
|
|
123 | (20) |
|
|
|
123 | (1) |
|
|
|
123 | (1) |
|
|
|
124 | (1) |
|
|
|
125 | (1) |
|
|
|
125 | (1) |
|
|
|
125 | (1) |
|
|
|
125 | (2) |
|
|
|
127 | (3) |
|
|
|
128 | (1) |
|
|
|
128 | (2) |
|
|
|
130 | (4) |
|
|
|
132 | (2) |
|
|
|
134 | (2) |
|
|
|
136 | (1) |
|
|
|
137 | (1) |
|
|
|
138 | (2) |
|
|
|
140 | (3) |
|
|
|
|
Welcome to ActionScript 2.0 |
|
|
143 | (36) |
|
|
|
143 | (1) |
|
Object-Oriented Programming |
|
|
144 | (4) |
|
|
|
144 | (1) |
|
|
|
145 | (1) |
|
|
|
145 | (2) |
|
|
|
147 | (1) |
|
Where Do Objects Come From? |
|
|
148 | (6) |
|
|
|
154 | (1) |
|
Introduction to ActionScript 2.0 |
|
|
155 | (2) |
|
Declaring Variables and Instance Names |
|
|
156 | (1) |
|
Strict Data Typing Variables |
|
|
157 | (1) |
|
Strict Data Typing with Functions |
|
|
158 | (2) |
|
|
|
160 | (4) |
|
Actions Panel Preferences |
|
|
164 | (2) |
|
|
|
166 | (1) |
|
Behaviors and the Behaviors Panel |
|
|
167 | (2) |
|
ActionScript Fundamentals |
|
|
169 | (1) |
|
|
|
169 | (1) |
|
Code Hints and Naming Conventions |
|
|
170 | (3) |
|
|
|
171 | (1) |
|
Triggering Code Hints with Comments |
|
|
172 | (1) |
|
Strict Data Typing to Trigger Code Hints |
|
|
173 | (1) |
|
|
|
173 | (2) |
|
|
|
175 | (1) |
|
|
|
176 | (1) |
|
|
|
176 | (1) |
|
|
|
177 | (1) |
|
|
|
178 | (1) |
|
Strings, Numbers and Variables---In Depth |
|
|
179 | (38) |
|
|
|
179 | (1) |
|
|
|
180 | (3) |
|
|
|
180 | (1) |
|
|
|
181 | (1) |
|
|
|
181 | (1) |
|
|
|
182 | (1) |
|
|
|
183 | (11) |
|
|
|
183 | (2) |
|
Indexing Characters in Strings |
|
|
185 | (8) |
|
|
|
193 | (1) |
|
|
|
194 | (4) |
|
|
|
194 | (1) |
|
Solving the Problem of Repeating Decimal Points |
|
|
195 | (1) |
|
Predefined Values for Numbers |
|
|
195 | (2) |
|
|
|
197 | (1) |
|
|
|
198 | (1) |
|
|
|
198 | (1) |
|
|
|
199 | (1) |
|
|
|
199 | (1) |
|
|
|
199 | (16) |
|
|
|
200 | (1) |
|
Changing Data in Variables |
|
|
201 | (1) |
|
Incrementing and Decrementing Variables |
|
|
202 | (2) |
|
|
|
204 | (1) |
|
|
|
204 | (2) |
|
Combining Types of Values in Variables |
|
|
206 | (2) |
|
Converting Variables Using Functions and Methods |
|
|
208 | (2) |
|
|
|
210 | (4) |
|
|
|
214 | (1) |
|
|
|
215 | (2) |
|
|
|
217 | (26) |
|
What Is an Array and How Does It Work? |
|
|
217 | (1) |
|
|
|
217 | (1) |
|
|
|
218 | (3) |
|
Retrieving Information from an Array |
|
|
221 | (1) |
|
Adding Elements to Arrays |
|
|
221 | (8) |
|
|
|
223 | (2) |
|
|
|
225 | (1) |
|
|
|
226 | (2) |
|
|
|
228 | (1) |
|
|
|
229 | (1) |
|
|
|
230 | (3) |
|
|
|
230 | (1) |
|
Removing Elements Using the length Property |
|
|
231 | (1) |
|
The splice Method Revisited |
|
|
231 | (1) |
|
|
|
232 | (1) |
|
|
|
232 | (1) |
|
Changing Elements in Arrays |
|
|
233 | (1) |
|
|
|
233 | (2) |
|
|
|
235 | (2) |
|
|
|
235 | (1) |
|
|
|
236 | (1) |
|
|
|
236 | (1) |
|
|
|
237 | (1) |
|
|
|
237 | (2) |
|
|
|
238 | (1) |
|
|
|
239 | (3) |
|
|
|
242 | (1) |
|
Statements and Expressions |
|
|
243 | (34) |
|
|
|
245 | (2) |
|
|
|
246 | (1) |
|
|
|
247 | (3) |
|
|
|
247 | (1) |
|
|
|
248 | (2) |
|
|
|
250 | (25) |
|
|
|
251 | (1) |
|
|
|
251 | (3) |
|
|
|
254 | (6) |
|
|
|
260 | (2) |
|
|
|
262 | (1) |
|
switch, case, default, and break |
|
|
262 | (4) |
|
|
|
266 | (9) |
|
|
|
275 | (2) |
|
|
|
277 | (28) |
|
|
|
277 | (1) |
|
|
|
278 | (1) |
|
Using Parameters in Functions |
|
|
279 | (2) |
|
Functions That Return Values |
|
|
281 | (1) |
|
|
|
282 | (1) |
|
|
|
283 | (1) |
|
|
|
284 | (1) |
|
|
|
284 | (2) |
|
|
|
286 | (2) |
|
|
|
288 | (1) |
|
|
|
288 | (3) |
|
|
|
291 | (3) |
|
|
|
294 | (2) |
|
Functions Built In to Flash |
|
|
296 | (8) |
|
|
|
296 | (2) |
|
|
|
298 | (1) |
|
|
|
299 | (1) |
|
|
|
300 | (4) |
|
|
|
304 | (1) |
|
|
|
305 | (38) |
|
|
|
305 | (2) |
|
Creating Movie Clips Manually |
|
|
305 | (1) |
|
Creating Movie Clips with ActionScript |
|
|
306 | (1) |
|
|
|
307 | (22) |
|
Animating Movie Clips with ActionScript |
|
|
308 | (3) |
|
The cacheAsBitmap Property |
|
|
311 | (1) |
|
Using Math to Help Animate Movie Clips |
|
|
311 | (2) |
|
|
|
313 | (3) |
|
|
|
316 | (2) |
|
|
|
318 | (2) |
|
Depth and the Stacking Order |
|
|
320 | (4) |
|
|
|
324 | (5) |
|
|
|
329 | (1) |
|
The removeMovieClip() Method |
|
|
329 | (1) |
|
|
|
330 | (11) |
|
|
|
330 | (1) |
|
|
|
331 | (1) |
|
|
|
332 | (2) |
|
The lineGradientStyle() Method |
|
|
334 | (2) |
|
|
|
336 | (1) |
|
The beginGradientFill() Method |
|
|
337 | (2) |
|
|
|
339 | (2) |
|
|
|
341 | (2) |
|
|
|
343 | (20) |
|
|
|
344 | (8) |
|
|
|
344 | (3) |
|
|
|
347 | (4) |
|
|
|
351 | (1) |
|
Callbacks Versus Listeners---The Showdown |
|
|
351 | (1) |
|
|
|
352 | (2) |
|
|
|
354 | (4) |
|
Movie Clips Handling Button Events |
|
|
356 | (2) |
|
Events of the Mouse Object |
|
|
358 | (1) |
|
|
|
359 | (1) |
|
Events of the TextField Object |
|
|
360 | (1) |
|
|
|
361 | (1) |
|
|
|
362 | (1) |
|
|
|
363 | (36) |
|
|
|
363 | (5) |
|
Spell Checking Text Fields |
|
|
366 | (2) |
|
|
|
368 | (3) |
|
|
|
368 | (1) |
|
|
|
368 | (2) |
|
|
|
370 | (1) |
|
Creating Text Fields in ActionScript |
|
|
371 | (2) |
|
Formatting the Text in Text Fields |
|
|
373 | (9) |
|
|
|
374 | (4) |
|
|
|
378 | (4) |
|
|
|
382 | (3) |
|
|
|
383 | (2) |
|
|
|
385 | (10) |
|
|
|
390 | (3) |
|
HTML Text Fields and JavaScript |
|
|
393 | (2) |
|
|
|
395 | (2) |
|
|
|
395 | (1) |
|
|
|
395 | (2) |
|
|
|
397 | (2) |
|
|
|
399 | (34) |
|
|
|
399 | (1) |
|
Getting Started with Components |
|
|
400 | (17) |
|
|
|
400 | (1) |
|
Adding Components to the Stage |
|
|
400 | (1) |
|
|
|
400 | (2) |
|
|
|
402 | (1) |
|
|
|
403 | (6) |
|
Changing the Parameters of a Component |
|
|
409 | (1) |
|
The Component Inspector Panel |
|
|
410 | (1) |
|
|
|
411 | (2) |
|
Capturing Component Events |
|
|
413 | (3) |
|
Getting Data from Components |
|
|
416 | (1) |
|
|
|
417 | (3) |
|
Manually Skinning a Component |
|
|
417 | (1) |
|
|
|
418 | (2) |
|
The dataProvider Property |
|
|
420 | (3) |
|
|
|
423 | (2) |
|
Creating a Version 2.0 Component |
|
|
425 | (6) |
|
|
|
431 | (2) |
|
|
|
433 | (18) |
|
|
|
433 | (1) |
|
|
|
434 | (4) |
|
|
|
434 | (1) |
|
|
|
435 | (1) |
|
|
|
436 | (1) |
|
|
|
437 | (1) |
|
|
|
438 | (9) |
|
|
|
438 | (1) |
|
|
|
439 | (1) |
|
|
|
440 | (1) |
|
|
|
441 | (3) |
|
|
|
444 | (2) |
|
|
|
446 | (1) |
|
|
|
447 | (4) |
|
|
|
|
|
|
451 | (20) |
|
Why Use External ActionScript? |
|
|
452 | (1) |
|
#include Versus Classpath |
|
|
453 | (3) |
|
Getting Started with External Class Files |
|
|
456 | (10) |
|
|
|
457 | (1) |
|
Public, Private, and Static |
|
|
458 | (2) |
|
Declaring Properties with a Constructor Function |
|
|
460 | (1) |
|
|
|
460 | (1) |
|
Creating Getter/Setter Methods |
|
|
461 | (2) |
|
|
|
463 | (1) |
|
|
|
463 | (1) |
|
|
|
464 | (2) |
|
|
|
466 | (3) |
|
|
|
469 | (2) |
|
|
|
471 | (26) |
|
Why Load External Content? |
|
|
471 | (1) |
|
What Content Can Be Loaded and Where? |
|
|
472 | (2) |
|
Loading Images Dynamically |
|
|
474 | (10) |
|
|
|
474 | (3) |
|
|
|
477 | (2) |
|
The loadMovieNum() Method |
|
|
479 | (1) |
|
|
|
480 | (1) |
|
The removeMovieClip() Method |
|
|
481 | (1) |
|
The unloadMovieNum() Function |
|
|
482 | (1) |
|
|
|
483 | (1) |
|
Loading SWF Files into Flash |
|
|
484 | (3) |
|
Manipulating Loaded SWF Files |
|
|
485 | (2) |
|
Loading External Content into Text Fields |
|
|
487 | (3) |
|
Manipulating Embedded Content in Text Fields |
|
|
489 | (1) |
|
|
|
490 | (5) |
|
The getBytesTotal() and getBytesLoaded() Methods |
|
|
490 | (3) |
|
The ProgressBar Component |
|
|
493 | (2) |
|
|
|
495 | (2) |
|
Introduction to Data Integration |
|
|
497 | (22) |
|
|
|
497 | (1) |
|
|
|
498 | (3) |
|
|
|
501 | (1) |
|
The escape() and unescape() functions |
|
|
501 | (1) |
|
|
|
502 | (5) |
|
|
|
503 | (4) |
|
The loadVariablesNum() Method |
|
|
507 | (1) |
|
|
|
508 | (5) |
|
|
|
508 | (1) |
|
|
|
509 | (1) |
|
The Undocumented onData a Event |
|
|
510 | (3) |
|
The ExternalInterface API |
|
|
513 | (4) |
|
|
|
513 | (2) |
|
|
|
515 | (2) |
|
|
|
517 | (2) |
|
|
|
519 | (24) |
|
|
|
519 | (1) |
|
|
|
520 | (1) |
|
|
|
520 | (1) |
|
|
|
521 | (1) |
|
|
|
522 | (2) |
|
Sending and Receiving Data |
|
|
524 | (5) |
|
|
|
525 | (1) |
|
Sending and Receiving in Flash |
|
|
526 | (3) |
|
|
|
529 | (12) |
|
|
|
541 | (2) |
|
|
|
543 | (24) |
|
|
|
543 | (3) |
|
|
|
544 | (1) |
|
|
|
544 | (1) |
|
|
|
545 | (1) |
|
Now That It's All Installed |
|
|
545 | (1) |
|
|
|
546 | (1) |
|
PHP and Flash---Receiving Data |
|
|
546 | (8) |
|
|
|
546 | (1) |
|
Example 2---Hello, Goodbye World |
|
|
547 | (2) |
|
Example 3---Multiple Values and Multiple Variables |
|
|
549 | (2) |
|
Example 4---Sending Mail with Flash and PHP |
|
|
551 | (3) |
|
PHP and Flash---Sending and Receiving Data |
|
|
554 | (2) |
|
Example 5---Confirming sentMail |
|
|
555 | (1) |
|
Incorporating a MySQL Database |
|
|
556 | (7) |
|
|
|
556 | (7) |
|
File Uploads---Flash 8 Specific |
|
|
563 | (3) |
|
|
|
564 | (2) |
|
|
|
566 | (1) |
|
Flash Remoting with ColdFusion |
|
|
567 | (28) |
|
|
|
568 | (1) |
|
|
|
568 | (1) |
|
|
|
569 | (1) |
|
ColdFusion and Flash Flowchart |
|
|
570 | (1) |
|
Flash Remoting Setup Process |
|
|
570 | (1) |
|
|
|
571 | (2) |
|
|
|
571 | (2) |
|
Installing ColdFusion MX7 |
|
|
573 | (1) |
|
|
|
573 | (1) |
|
Creating a ColdFusion Data Source |
|
|
573 | (1) |
|
Reviewing the Application |
|
|
574 | (2) |
|
Let's Begin: ColdFusion Components (CFCs) |
|
|
576 | (1) |
|
Flash Remoting and ActionScript 2.0 |
|
|
577 | (6) |
|
Import Flash Remoting ActionScript Classes |
|
|
578 | (1) |
|
Establish a Gateway Connection and Service |
|
|
579 | (1) |
|
Communicate with the CFC and Handle the Results |
|
|
580 | (3) |
|
Building Your Application |
|
|
583 | (10) |
|
|
|
593 | (2) |
|
|
|
595 | (28) |
|
|
|
595 | (1) |
|
|
|
596 | (6) |
|
|
|
598 | (1) |
|
|
|
599 | (3) |
|
Elements Versus Attributes |
|
|
602 | (1) |
|
|
|
602 | (15) |
|
|
|
603 | (14) |
|
The XML Connector Component |
|
|
617 | (3) |
|
|
|
618 | (1) |
|
|
|
618 | (2) |
|
|
|
620 | (2) |
|
|
|
622 | (1) |
|
|
|
623 | (18) |
|
|
|
623 | (1) |
|
|
|
623 | (1) |
|
|
|
624 | (5) |
|
Consuming Web Services with Flash |
|
|
629 | (1) |
|
|
|
629 | (1) |
|
|
|
630 | (1) |
|
|
|
631 | (1) |
|
The WebServiceConnector Component |
|
|
632 | (1) |
|
|
|
633 | (4) |
|
Consuming Outside Web Services |
|
|
637 | (1) |
|
Absorbing the Amazon Web Service |
|
|
638 | (2) |
|
|
|
640 | (1) |
|
|
|
641 | (18) |
|
|
|
641 | (1) |
|
|
|
642 | (3) |
|
|
|
645 | (1) |
|
|
|
645 | (3) |
|
|
|
645 | (1) |
|
|
|
646 | (1) |
|
|
|
646 | (1) |
|
|
|
646 | (1) |
|
The setBufferTime() Method |
|
|
647 | (1) |
|
|
|
647 | (1) |
|
Properties of the NetStream Object |
|
|
648 | (1) |
|
|
|
648 | (1) |
|
|
|
649 | (1) |
|
|
|
649 | (3) |
|
The FLVPlayback Component |
|
|
652 | (3) |
|
|
|
655 | (2) |
|
|
|
655 | (1) |
|
The activityLevel Property |
|
|
656 | (1) |
|
|
|
657 | (2) |
|
|
|
659 | (32) |
|
|
|
659 | (1) |
|
|
|
660 | (5) |
|
|
|
660 | (2) |
|
Saving Commands from the History Panel |
|
|
662 | (1) |
|
Creating Commands Manually with JSFL |
|
|
663 | (2) |
|
|
|
665 | (1) |
|
|
|
665 | (4) |
|
|
|
669 | (4) |
|
|
|
673 | (2) |
|
|
|
675 | (6) |
|
|
|
681 | (3) |
|
|
|
684 | (6) |
|
|
|
690 | (1) |
|
|
|
691 | (14) |
|
|
|
691 | (7) |
|
|
|
691 | (2) |
|
|
|
693 | (1) |
|
|
|
694 | (1) |
|
|
|
694 | (1) |
|
|
|
695 | (1) |
|
|
|
695 | (2) |
|
|
|
697 | (1) |
|
|
|
698 | (1) |
|
|
|
698 | (1) |
|
|
|
698 | (1) |
|
|
|
699 | (1) |
|
|
|
699 | (3) |
|
|
|
699 | (1) |
|
|
|
700 | (1) |
|
|
|
700 | (1) |
|
|
|
701 | (1) |
|
|
|
702 | (3) |
|
|
|
|
A. ActionScript Reference |
|
|
705 | (90) |
|
|
|
705 | (20) |
|
|
|
706 | (1) |
|
|
|
707 | (18) |
|
The External Interface Class |
|
|
725 | (2) |
|
|
|
725 | (1) |
|
|
|
726 | (1) |
|
|
|
727 | (3) |
|
|
|
729 | (1) |
|
|
|
730 | (1) |
|
|
|
731 | (1) |
|
The ColorMatrixFilter Class |
|
|
731 | (2) |
|
|
|
732 | (1) |
|
The ConvolutionFilter Class |
|
|
733 | (2) |
|
|
|
734 | (1) |
|
The DisplacementMapFilter Class |
|
|
735 | (2) |
|
|
|
736 | (1) |
|
The DropShadowFilter Class |
|
|
737 | (3) |
|
|
|
739 | (1) |
|
|
|
740 | (2) |
|
|
|
741 | (1) |
|
The GradientBevelFilter Class |
|
|
742 | (2) |
|
|
|
743 | (1) |
|
The GradientGlowFilter Class |
|
|
744 | (2) |
|
|
|
745 | (1) |
|
|
|
746 | (3) |
|
|
|
747 | (1) |
|
|
|
748 | (1) |
|
|
|
749 | (7) |
|
|
|
750 | (6) |
|
|
|
756 | (6) |
|
|
|
757 | (1) |
|
|
|
757 | (5) |
|
|
|
762 | (10) |
|
|
|
763 | (2) |
|
|
|
765 | (7) |
|
|
|
772 | (3) |
|
|
|
772 | (3) |
|
|
|
775 | (12) |
|
|
|
775 | (1) |
|
|
|
776 | (5) |
|
|
|
781 | (6) |
|
The FileReferenceList Class |
|
|
787 | (6) |
|
|
|
788 | (1) |
|
|
|
788 | (3) |
|
|
|
791 | (2) |
|
|
|
793 | (2) |
|
|
|
793 | (1) |
|
|
|
794 | (1) |
| Index |
|
795 | |