Your Visual Blueprint for Creating Interactive Projects in Flash CS4 Professional
Designed for visual learners, with two-page lessons and step-by-step, illustrated instructions, this book covers foundation ActionScript, animating, interactivity, and working with external content. It demonstrates using the Actions panel, syntax rules, and essential language foundations.
Visual learners can get up and running quickly on ActionScript programming skills for Flash CS4. If you're a programmer who learns best when you see how something is done, this book will have you up and running with ActionScipt in no time. Its step-by-step, two-page lessons show you the core programming foundations you must master to create rich Internet content using the preferred language for work with Flash. The visual approach breaks big topics into bite-sized modules, with high-resolution screen shots to illustrate each task. You'll learn such skills as how to add interactivity, animate in code, and work with external content to create Flash projects with pizzazz. This book is designed for visual learners, with two-page lessons and step-by-step, fully illustrated instructions. It covers foundation ActionScript, animating, interactivity, and working with external content. It demonstrates using the Actions panel, syntax rules, and essential language foundations. It shows how to use variables and arrays; write functions, classes, if/else statements, and loops; and work with static classes such as Math.; It also explores essential techniques such as loading visual aspects at runtime, text from delimited text files and XML, and server-based assets using Flash Remoting. The companion Web site features all the code that appears in the text, ready to plug into your Web pages. "ActionScript: Your Visual Blueprint to Creating Interactive Projects in Flash CS4 Professional" is the visual learner's way to master ActionScript quickly and easily.
HOW TO USE THIS VISUAL BLUEPRINT BOOK. 1 INTRODUCING ACTIONSCRIPT. Introducing Flash. Understanding Flash Player 10. Introducing ActionScript 3.0. Create a New Flash Movie. Using the Actions Panel. 2 INTRODUCING THE BASIC SYNTAX OF ACTIONSCRIPT. Understanding Object-Oriented Programming. Understanding ActionScript Syntax Rules. Create a Variable. Understanding Data Types. Test Your Flash Movie. Concatenate Strings. Trace Variables. Create an Array. Add and Remove Elements from an Array. Create an Array in an Array. Create a Generic Object. Add Constants. Add Comments to Your Code. Understanding Coding Best Practices. 3 CONTROLLING OBJECTS ON THE STAGE. Draw Shapes in Flash. Introducing Symbols. Create a Symbol. Insert and Name an Instance. Set Instance Properties Using the Properties Panel. Set Instance Properties in Code. 4 WORKING WITH NONVISUAL CLASSES. Perform Simple Mathematical Operations. Perform Complex Mathematical Operations with the Math Class. Generate Random Numbers. Create Instances of the Date Class. Perform Math on Dates. 5 WRITING FUNCTIONS. Write a Function. Call a Function. Pass Data to Functions. Return a Value from a Function. 6 CREATING CUSTOM CLASSES. Create a Package. Create a New ActionScript File. Create a Custom Class Skeleton. Define Properties of the Class. Create a Constructor. Define a Method. Extend a Class. Using a Custom Class. Define a Document Class. Get and Set Class Properties. Add a Static Property to a Class. 7 USING EVENTS. Create an Event Handler. Call an Event from a Button. Define Events in a Custom Class. Remove Event Listeners. Using the Target Property. 8 CONTROLLING THE TIMELINE IN CODE. Stop a Movie. Go to a Specific Frame in a Movie. Add Code to a MovieClip's Timeline. Control a MovieClip from the Main Timeline. Work with the Stage in Code. Add MovieClips to the Stage through Code. Remove Elements from the Stage. 9 WORKING WITH TEXT. Create a Dynamic Text Field Visually. Create a Dynamic Text Field in Code. Create an Input Text Field Visually. Create an Input Text Field in Code. Work with TextField Events. Find Characters within Strings. Manipulate Strings. Get Pieces of Strings. Convert Data Types. 10 FORMATTING TEXT. Understanding the TextFormat Class. Apply Formatting to a Text Field. Using HTML Text. 11 MAKING DECISIONS IN CODE. Write an If Statement. Using Else and Else If Clauses. Test Multiple Conditions. Replace If/Else Clauses with a Switch Statement. 12 LOOPING OVER CODE. Write a For Loop. Write a While Loop. Loop over an Array. 13 ANIMATING IN CODE. Using the EnterFrame Event. Animate MovieClips That Scale and Fade. Change the Speed of Animation. Using the Timer Class. Create Tweens in Script. Ease Tweened Animation. Allow Users to Drag and Drop Objects. Animate in 3D. 14 ADDING KEYBOARD CONTROLS. React to a Key Press. Using Keyboard Constants. 15 WORKING WITH SOUND. Understanding Sound in Flash. Add a Sound to the Library and Play It. Load and Play an External Sound. Avoid Errors Due to Loading Delays. Pause and Resume Sounds. Control Sound Volume. Display Information about Sound Files. 16 WORKING WITH VIDEO. Convert Video to Flash Video. Using the FLVPlayback Component Visually. Using the FLVPlayback Component in Code. Go Full Screen. Add Closed Captioning. Style Closed Captions. 17 WORKING WITH DATA. Understanding XML and E4X. Embed XML in ActionScript. Read XML. Filter XML. Write XML. Load XML at Runtime. 18 EXCHANGING DATA WITH A SERVER. Download the Apache Web Server. Install the Apache Server. Download Adobe ColdFusion. Install ColdFusion. Download PHP. Install PHP. Send Data to the Server. Create XML with ColdFusion. Create XML with PHP. Read Data from the Server. 19 DRAWING VECTORS IN CODE. Draw Lines in Code. Draw Curves in Code. Draw Shapes in Code. Create Fills. Transform Visual Objects. Add Filters through Code. Cache Vectors As Bitmaps. Draw a Bitmap. Add an Image to the Library and Create a Bitmap from It. 20 WORKING WITH AIR. Understanding AIR. Create a New AIR Application. Digitally Sign Your Application. Detect User Inactivity. Allow Users to Save Data. APPENDIX A: ACTIONSCRIPT CLASS REFERENCE. APPENDIX B: ACTIONSCRIPT OPERATORS REFERENCE. APPENDIX C: SUPPORTED HTML TAGS. INDEX.