Register your product to gain access to bonus material or receive a coupon.
Discover just how spectacular your Flash movies can be! In this hands-on tutorial, Dan Livingston shows how to make the most of Flash interactivity using ActionScript, Flash's powerhouse scripting language. Master ActionScript through dozens of professional-quality examplesall available on the CD-ROM and on the book's companion Web site. From scripting fundamentals to debugging, controlling the Flash Player to using XML, ActionScript is easier than you thinkand more powerful than you ever imagined!
Take Flash to the limitand beyond!
Take the Next StepNow!
The New Advanced Series for Experienced Web ProfessionalsReady to make the most of your toolsand your time? We've got the books for you! Written by top Web pros, these hands-on, example-driven guides help you master only the most powerful, most important techniquesfast!
About the CD-ROMThe accompanying CD-ROM contains every Flash movie constructed in the bookall Mac- and Windows-compatible, and editable on any computer running Flash 5.
Click here for a sample chapter for this book: 0130931276.pdf
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.
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.
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.
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.
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.
General Troubleshooting. Debugger. The Pudgy Bird Movie. Opening the Debugging Window. Watching Variables. Changing Properties. Changing Variables. Trace. Comments. Listing Object and Variables. Conclusion.
Pudgy. Controls and Events. The Jump. All the Code. Elasticity. Action-only Movie Clips. Inertia. The Box Clip. The Inertia Movie Clip. Conclusion.
What Most Users Want. What to Do.
Bitwise Operators. Deprecated Functions. ActionScript Reference.
I've written a few books on some pretty fun topics (PhotoShop, DHTML, and JavaScript), but I had a great time writing this book-Flash 5 is a hoot. Flash 5 can do some pretty amazing things, and I hope I've been able to show you some of these things well enough to get you excited too.
The Goal of This BookWhen you're through with this book, you should have a thorough grasp of what Flash 5 and ActionScript can do, and know how to create a wide diversity of really engaging, fun, and useful interactive Flash movie. I'm talking fantastic navigation, awesome games, and efficient, robust applications.
Hopefully, given the foundation you'll get in this book, you'll be able to create new kinds of Flash movies that no one else has thought of.
The focus of this book is more technical than artistic, but I believe it provides a good springboard for programmers, animators, and artists alike.
Who This Book Is ForThis book is for anyone who wants to include any level of complexity and interaction in their Flash movies. This can include navigation, games, and interaction with middleware and databases.
You can be a right-brained Flash designer who's making the reluctant leap into ActionScript or a seasoned, left-brained programmer who wants to create a custom interface to a backend e-commerce system.
To get the most out of this book, you should already know some Flash basics:
That's it. If you know how to do these things at all, then you're ready for this book.
How This Book TeachesBoth my parents were teachers, and they shared the same philosophy. "There are three ways to teach," they said, "example, example, example." I think they're right on this one, and this book uses complete, fully functional examples for every aspect of interactivity and ActionScript in this book. All examples can be found on the accompanying CD and on Web sites at www.phptr.com/advancedweb
and www.wire-man.com/flash5/
.
I've tried to avoid using overly simple squares and circles to explain concepts (I mostly succeeded). Instead, I'll ask you to load small movies and manipulate them. You will see a number of examples using Jake the Fish, and I hope you'll forgive my small indulgenceit's the only way I can put my marine zoology degree to use.