| |
| |
| |
Foundation | |
| |
| |
{Foundation} Introduction | |
| |
| |
| |
Flash Basics | |
| |
| |
Timeline Hierarchy | |
| |
| |
Implications for Animation and Filesize | |
| |
| |
Implications for Programming | |
| |
| |
Targeting | |
| |
| |
Script Locations | |
| |
| |
Always Movie Clips | |
| |
| |
Coordinate System | |
| |
| |
Tricks of the Trade | |
| |
| |
Invisible Buttons | |
| |
| |
Empty Movie Clips | |
| |
| |
Empty Layers and Keyframes | |
| |
| |
Summary | |
| |
| |
| |
What's New in Flash 5 | |
| |
| |
Advanced Features Making Programming Easy | |
| |
| |
Clip Events | |
| |
| |
Smart Clips | |
| |
| |
External Scripts | |
| |
| |
Custom Functions | |
| |
| |
Objects | |
| |
| |
HTML Text | |
| |
| |
Previous Knowledge Worth Forgetting | |
| |
| |
Deprecated ActionScript | |
| |
| |
Non-Deprecated ActionScripts That Should Be | |
| |
| |
Old Tricks That Are Old News | |
| |
| |
Summary | |
| |
| |
| |
The Programmer's Approach | |
| |
| |
Specification | |
| |
| |
Prototyping | |
| |
| |
Hard Wiring | |
| |
| |
Pseudo-Code | |
| |
| |
Good Style | |
| |
| |
Less Is More | |
| |
| |
Comments | |
| |
| |
Magic Numbers, Constants, and Variables | |
| |
| |
Repeated Code | |
| |
| |
Code Data Separation | |
| |
| |
Summary | |
| |
| |
| |
Basic Programming in Flash | |
| |
| |
Terminology, Special Characters, and Formatting | |
| |
| |
Events | |
| |
| |
Results of Events | |
| |
| |
Terms | |
| |
| |
Special Characters and Formatting | |
| |
| |
Data Types and Variables | |
| |
| |
Variables' Names and Values | |
| |
| |
String and Number Data Types | |
| |
| |
Other Data Types | |
| |
| |
Using Variables | |
| |
| |
Assigning and Accessing Variables | |
| |
| |
Comparing and Passing Values | |
| |
| |
Scope and Variable Collision | |
| |
| |
Dot Syntax | |
| |
| |
Summary | |
| |
| |
| |
Programming Structures | |
| |
| |
Statements, Expressions, and Operators | |
| |
| |
Writing Expressions | |
| |
| |
Using Operators in Expressions | |
| |
| |
Types of Statements | |
| |
| |
Built-in Statements | |
| |
| |
Simple Objects in Statements | |
| |
| |
Using the Math Object | |
| |
| |
Using the Number Object | |
| |
| |
Conditional and Loop Statements | |
| |
| |
Conditional Statements: if, if else, if else if | |
| |
| |
Loop Statements: for, for in | |
| |
| |
While | |
| |
| |
Applied Expression Writing | |
| |
| |
Summary | |
| |
| |
| |
Debugging | |
| |
| |
General Approaches to a Bug-Free Life | |
| |
| |
Finding and Defining Bugs | |
| |
| |
Fixing Bugs | |
| |
| |
Preventing Bugs | |
| |
| |
Using the Debugger | |
| |
| |
Viewing and Setting Properties and Variables | |
| |
| |
Watching Variables | |
| |
| |
Remote Debugging | |
| |
| |
Strategies of Debugging | |
| |
| |
Summary | |
| |
| |
| |
The Movie Clip Object | |
| |
| |
Properties of Clips | |
| |
| |
You Can Get Them All, But You Can't Set Them All | |
| |
| |
Anonymous Targeting | |
| |
| |
Variables in Clips (or "Homemade Properties") | |
| |
| |
Methods of Clips | |
| |
| |
Referencing Clips and Targeting | |
| |
| |
Relative and Absolute Referencing | |
| |
| |
Dynamic Referencing | |
| |
| |
Summary | |
| |
| |
| |
Functions | |
| |
| |
How to Use Functions | |
| |
| |
Using Built-in Functions | |
| |
| |
Using Homemade Functions | |
| |
| |
Creating Homemade Functions | |
| |
| |
Basics | |
| |
| |
Functions as Subroutines | |
| |
| |
Making Functions That Accept Parameters | |
| |
| |
Making Functions That Return Values | |
| |
| |
Using Functions as Methods | |
| |
| |
Local Variables | |
| |
| |
Applying Functions to Previous Knowledge | |
| |
| |
Review Built-in Functions | |
| |
| |
Things to Remember | |
| |
| |
Summary | |
| |
| |
| |
Selecting Text, Trapping Keys, and Manipulating Strings | |
| |
| |
String Object Form | |
| |
| |
Esoteric String Object Details | |
| |
| |
Methods of the String Object Explored | |
| |
| |
Zero-Based System | |
| |
| |
Extracting Portions of Strings | |
| |
| |
Extracting Characters, Changing Case, and Searching | |
| |
| |
String Object Methods Applied | |
| |
| |
Using HTML Text | |
| |
| |
Selection Object | |
| |
| |
Getting and Setting Focus | |
| |
| |
Setting and Getting Selections | |
| |
| |
Key Object | |
| |
| |
Using the Key Object | |
| |
| |
Key Object Examples | |
| |
| |
Summary | |
| |
| |
| |
Arrays | |
| |
| |
Array Overview | |
| |
| |
Array Creation and Manipulation | |
| |
| |
Creating and Populating Arrays | |
| |
| |
Accessing Array Contents | |
| |
| |
Array Object Methods | |
| |
| |
Associative Arrays | |
| |
| |
Summary | |
| |
| |
| |
Objects | |
| |
| |
Formal Rules of Objects | |
| |
| |
Attach Sound | |
| |
| |
Sound Object Basics | |
| |
| |
Advanced Sound Controls | |
| |
| |
Controlling Multiple Sounds | |
| |
| |
Color | |
| |
| |
Simple Coloring | |
| |
| |
Using RGB Values | |
| |
| |
Using the Color Transform Method | |
| |
| |
Date | |
| |
| |
Instantiating a Date | |
| |
| |
Manipulating Dates | |
| |
| |
Attach Movie Clip | |
| |
| |
Summary | |
| |
| |
| |
Homemade Objects | |
| |
| |
Basic Objects | |
| |
| |
Using Constructor Function | |
| |
| |
Making Methods | |
| |
| |
Inheritance | |
| |
| |
Practical Example of Homemade Objects | |
| |
| |
Summary | |
| |
| |
| |
Smart Clips | |
| |
| |
Standard Smart Clips | |
| |
| |
Making Smart Clips | |
| |
| |
Advanced Applications for Standard Smart Clips | |
| |
| |
Replacing the Clip Parameters Panel with Custom UIs | |
| |
| |
Designing Custom UIs | |
| |
| |
Building Custom UIs | |
| |
| |
Summary | |
| |
| |
| |
Interfacing with External Data | |
| |
| |
External Scripts | |
| |
| |
External Data Files | |
| |
| |
Waiting for Variables to Load | |
| |
| |
Data File Format | |
| |
| |
Examples of Using External Data Files | |
| |
| |
Server Scripts | |
| |
| |
XML | |
| |
| |
JavaScript | |
| |
| |
Quick and Dirty Method | |
| |
| |
JavaScript Talking to Flash | |
| |
| |
Targeting the Flash Object | |
| |
| |
Workarounds | |
| |
| |
Director and Authorware | |
| |
| |
Flash in Authorware | |
| |
| |
Flash in Director | |
| |
| |
Summary | |
| |
| |
| |
Workshop | |
| |
| |
{Workshop} Introduction | |
| |
| |
| |
Beginning Workshops | |
| |
| |
| |
Ensuring That Users Have the Flash 5 Player | |
| |
| |
| |
Faking Video | |
| |
| |
| |
Creating Custom Cursors | |
| |
| |
| |
Creating a Horizontal Slider | |
| |
| |
Creating a Quick and Dirty Slider | |
| |
| |
Converting the Slider into a Smart Clip | |
| |
| |
Summary | |
| |
| |
| |
Building a Slide Show | |
| |
| |
| |
Mapping | |
| |
| |
| |
Working with Odd-Shaped Clickable Areas | |
| |
| |
| |
Adapting Built-in Smart Clips | |
| |
| |
| |
Intermediate Workshops | |
| |
| |
| |
Creating a Currency-Exchange Calculator | |
| |
| |
| |
Creating a ToolTip Smart Clip | |
| |
| |
| |
Creating a Digital Timer | |
| |
| |
| |
Creating an Analog Timer | |
| |
| |
| |
Creating a Countdown Timer | |
| |
| |
| |
Using Math to Create a Circular Slider | |
| |
| |
| |
Developing Time-Based Animations | |
| |
| |
| |
Creating a Multistate Button | |
| |
| |
| |
Advanced Workshops | |
| |
| |
| |
Offline Production | |
| |
| |
| |
Creating a Dynamic Slide Presentation | |
| |
| |
| |
Creating JavaScript Cookies | |
| |
| |
| |
Writing JavaScript Inter-Movie Communications | |
| |
| |
| |
Fixing Broken Scripts | |
| |
| |
Card Flip | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Card Snap | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Circle Move | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Multiple Choice | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Rotating Box | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Word Float | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Yellow Box | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Click and Hold | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Objects | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Move Multiple | |
| |
| |
Hint | |
| |
| |
Solution | |
| |
| |
Summary | |
| |
| |
| |
Appendices | |
| |
| |
| |
Equivalents | |
| |
| |
Alternatives to Deprecated Code | |
| |
| |
TellTarget () | |
| |
| |
Call () | |
| |
| |
IfFrameLoaded () | |
| |
| |
ToggleHighQuality () | |
| |
| |
Eval () | |
| |
| |
Logical Operators (and, or, and not) | |
| |
| |
String Comparison Operators (eq, ge, gt, le, lt, and ne) | |
| |
| |
String Functions | |
| |
| |
Int () | |
| |
| |
Random () | |
| |
| |
No More Funkiness | |
| |
| |
Two-Frame "Updater" Movie Clips | |
| |
| |
Drag Invisible Movie Clip to Ascertain Mouse Position | |
| |
| |
Pseudo Arrays | |
| |
| |
URL-Encoded Data Instead of XML-Structured | |
| |
| |
The Oldest Ones in the Book | |
| |
| |
You Can't Set_currentframe | |
| |
| |
You Can Jump Only to Integer Frame Numbers | |
| |
| |
There's a Big Difference Between = and == | |
| |
| |
For-Loops Use Semicolons, Not Commas | |
| |
| |
| |
Making Flash Extensions for the Macromedia Exchange Web Site | |
| |
| |
How It Works | |
| |
| |
The MXI File Format | |
| |
| |
Index | |