Advanced Flash 5, ActionScript in Action

Dan Livingston · 2001

Foreword. Acknowledgments. 1. INTRODUCTION TO ACTIONSCRIPT. What Is ActionScript? What Is ActionScript Good For? What ActionScript Can't Do. Variables. Objects and Object-Oriented Scripting. Creating a Class. Object and Frame Actions. Object Actions-Movie Clips. Object Actions-Buttons. Frame Actions. Dot Syntax. Properties. Methods. Functions. Conclusion. 2. Your First ActionScripts. Using the Actions Panels. The Panels. Normal Mode Versus Expert Mode. Moving from Scene to Scene. Comments. on(event). Messing with Movie Clips. if and hitTest. Changing Movie Clip Properties. onClipEvent(keyDown). if (Key.getCode() = = Key.LEFT). _x. alphaBounds = alphaBar.getBounds(_root) Global Variables. Positioning the Slider. Making the Slider Slide. A Note About _xscale and _yscale. A Challenge. Another Property-Changing Example. Text Fields, Arrays, and Loops. Text Fields. Arrays. Looping. Creating the Movie. Associative Arrays. What You've Learned. 3. Adding Power to ActionScripts. Honing Your Skills. Troubleshooting. Space Game. Power Handling Movie Clips. Background: Levels. Duplicating Movie Clips. Removing Movie Clips. Duplicating with Purpose. Loading Movies. Attaching Movie Clips. Movie Explorer. Conclusion. 4. Serious Interactivity. Linking to the Outside World. Transparent Buttons. Calling JavaScript Using getURL. Receiving Data. Sending Variables with loadVariables. Formatting the Variables so Flash Can Read Them. FSCommand. Smart Clips. What Good Are Smart Clips? An Example: Dexter Dean Clothes. Creating a Custom Interface for Clip Parameters. Conclusion. 5. Flash and XML. What Is XML? The XML Object. The Screenplay Example. Creating XML. Creating the Object. Creating the Authors. Creating the Characters. The Whole Thing. The XMLSocket Object. Conclusion. 6. Troubleshooting ActionScript. General Troubleshooting. Debugger. The Pudgy Bird Movie. Opening the Debugging Window. Watching Variables. Changing Properties. Changing Variables. Trace. Comments. Listing Object and Variables. Conclusion. 7. Complex Scripting. Pudgy. Controls and Events. The Jump. All the Code. Elasticity. Action-only Movie Clips. Inertia. The Box Clip. The Inertia Movie Clip. Conclusion. Appendix A: Flash and Usability. What Most Users Want. What to Do. Appendix B: ActionScript Reference. Bitwise Operators. Deprecated Functions. ActionScript Reference. Index.

Read the paper · More papers on PaperTik