Article
The Flash Anthology: Cool Effects & Practical ActionScript - Chapter 1: Flash Essentials
Why Use Flash?
The new user can approach Flash from many different angles. Designers may well be impressed by Flash's capabilities in the realms of interface design, aesthetics, and functionality. If you have a strong coding background, mathematical experimentation and the opportunity to learn new coding techniques may pique your interest. Regardless of which direction you approach it from, the technology offers something to every budding Flash developer.
Flash's inherent ability to create super-compact, vector-based animations, coupled with a powerful scripting language (ActionScript), allows users to develop complex effects, transitions, and interfaces with relative ease—something that would take many more hours, or be completely impossible, using traditional HTML and DHTML coding methods.
Flash has enjoyed several incarnations since the early days before Macromedia acquired the now ubiquitous plug-in and authoring tool, and development continues today with the recent release of Flash MX 2004 Professional. The passing years have seen the use of Flash technology shift from black art to mainstream Web development practice, as each new version of the software provides users with additional capabilities, from animation, sound, and interactivity, to application server access and video inclusion.
If a complete Flash newbie were to purchase the latest copy of Flash and install it, he or she would likely be overwhelmed by the plethora of panels, drop-down menus, and user options available. Yet, after some experimentation, and a little time spent reading the manual and online tutorials, things would start to make sense. If you're in this boat—if this is the first book you've purchased since your recent acquisition of Flash—congratulations! You're in good company. If, on the other hand, you know your way around the application and its interface, and know what you want to do but are not exactly sure how to do it, then you, too, have come to the right place. Throughout this book, I'll attempt to present methods and procedures that address the questions that are most commonly posed in online forums and newsgroups. Sure, there are thousands of examples I could show you, but the solutions I've included here are the pick of the crop. Once you understand how the examples in this book fit together, you'll be able to apply them to many different instances and situations, and use them as building blocks for other Flash applications you may create.
Flash's power springs from its dynamism and versatility. There are so many things you can do with it, from creating simple animations for inclusion in your Web applications, to building robust SQL and XML data-feeding super-applications. It can be difficult to identify a single point at which to start or stop. You could decide to create a low-bandwidth animated headline for your Website; you might choose to build the whole of your Website as a Flash application or series of Flash applications. The choice is entirely up to you. This book provides real-world examples and leading-edge techniques involving different aspects of Flash. After each example, modifications will be presented that will allow you to extend that example to suit your particular needs.
I'll assume you're using Flash MX or later, and that you have some understanding of the software. This book won't walk you through the interface and tell you what it can do; instead, I expect you have a grip on the basics, and that you're itching to start using the program to its full potential. Some of the examples in this book are specific to Flash MX 2004, demonstrating powerful techniques for getting the most out of that version in the shortest time, but the majority apply to Flash MX and above.
It's time to buckle up and turn on the ignition. Let's see what Flash has to offer!
Note also that you can download this chapter in pdf format if you'd prefer to read this content offline.
What's New In Flash MX 2004?
Flash MX 2004 is a step above previous versions. Not only does it offer a plethora of enhancements and new features, but the software comes in two "flavours": Flash MX 2004 and Flash MX Professional 2004. Your needs will determine which version is right for you. Flash MX 2004 is the ideal instrument for developing multimedia content, or adding video, audio, graphics, or data to your projects. Flash MX 2004 Professional, on the other hand, contains additional features such as forms-based programming (much like Microsoft Visual Studio), data connectors for binding XML and Web Services to your projects, and project management tools.
If you intend to create projects that contain anything more than a modicum of ActionScript, you require connection to external data sources, or want to harness the power of advanced components, then I would strongly advise you to buy Flash MX Professional 2004. The day will come—probably sooner than you expect—when you'll need the extra horsepower it delivers. Don't get caught short!
Flash MX 2004 Features at a Glance
Let's take a look at the major improvements and new features offered by the 2004 releases. Those features marked (PRO) are available in the professional edition only.
ActionScript 2.0
A major object-oriented improvement to the ActionScript model, ActionScript 2.0 allows for strong typing and inheritance in accordance with the ECMA specifications. Don't worry if these terms are new to you—we'll discuss them in detail later.
Performance
The new version of the Flash Player has been substantially overhauled to increase playback speeds and responsiveness.
Error Reporting
The error reports generated when a Flash movie is previewed internally have been much improved in this release of the software. The reports provide more descriptive information, which makes it easier to fix show-stopping errors. See Chapter 9, Debugging for more information.
Security Model
The Flash Player security model has been improved significantly, and now provides even tighter security for your applications.
Importing
Flash developers can now import several new formats, including Adobe PDF and Adobe Illustrator 10. Flash MX 2004 also includes a Video Import Wizard to make importing video formats easier. See Chapter 6, Video Effects for details on this functionality.
Spell Checking
A fantastic new feature, spell check allows you to search text within your movies for typographical errors.
Help Panel
The Help Panel includes context-based help as well as a full ActionScript reference that updates at the click of a button with the latest content from Macromedia.
New Templates
A list of new templates designed to aid the rapid development of Flash applications is available with the 2004 release of Flash. The templates include:
- Advertising
- Form Applications (PRO)
- Mobile Devices
- Photo Slideshows
- Presentations
- Quiz
- Slide Presentations (PRO)
- Video (PRO)
To access the templates, select File > New, and click the Templates tab.
Timeline Effects
Timeline Effects allow you quickly to create editable common effects such as exploding text, blurred animation, and opacity transitions. Due to the extended API of Flash in the 2004 editions, many third-party software vendors now create these effects for use in Flash. An excellent range of third-party Timeline Effects is available from Macromedia's online store, and includes Distort FX, Pixel FX, and Text FX, developed by Red Giant Software. These allow you to create some mind-bending visuals from within Flash.
Behaviors
Behaviors allow you to quickly add basic ActionScript commands to your movies. They can form building blocks for your code, or you can simply use them to add interactivity without getting your hands dirty with ActionScript.
To access the Behaviors Panel, select Window > Development Panels > Behaviors.
Advanced Components (PRO)
Flash MX 2004 Professional includes a new series of components that facilitate the development of complex applications.
Flash Form Presentation (PRO)
Flash Form Presentation reflects a new development system much like that of Microsoft Visual Studio. It allows for the rapid creation of, for example, contact and registration forms. See Chapter 7, Flash Forms for more.
Flash Slide Presentation (PRO)
Creating slide-based applications has never been easier, thanks to the inclusion of built-in navigation to help users move through the slides.
Data Binding and Data Connection Objects (PRO)
Flash MX 2004 Professional introduces built-in data connectors to external data sources such as Web services and XML. With the introduction of Data Binding, components such as ComboBoxes can be populated with external data relatively easily.
Source Control (PRO)
You can now easily leverage source control in your Flash projects by integrating Flash with Microsoft Visual SourceSafe. This ensures you don't overwrite work by other team members on critical projects via the 'Check-In/Check-Out' methodology.