By Dan Carr
1 August 2011
1 August 2011
This guide assumes you are familiar with the Flash Professional workspace and have a basic knowledge of working with FLA files.
Note: For information on how to automate tasks in Flash Professional CS6, refer to this article.
Adobe Flash Professional CS5 provides a range of features that you can use to speed your graphic and visual effects production workflow.
Automation describes the use of prebuilt and saved functionality to facilitate routine processes and effects. For example, you could automate complex geometric graphics production using the decorative tools in Flash Professional as a shortcut for generating patterns. You could automate animation production by using saved and prebuilt tween effects in the Motion Presets panel. You could use saved and prebuilt commands in the Commands menu to automate common tasks, such as copying animations or configuring symbols.
Along with automation, this article provides an overview of the improved cross-product integration features available in Flash Professional CS5. By combining the workflow and automation features of Adobe Creative Suite 5, you can easily incorporate graphics and assets into your projects.
Flash Professional CS5 introduces an XML-based FLA format with improved support for cross-product workflows and better performance when working on large projects. You can save your project in compressed FLA format or uncompressed XFL format. The XFL format saves the project into a folder composed of XML files and graphic assets (JPEG, PNG, MP3, WAV, and so on). The assets can be edited directly by other applications and managed with source-control systems while working in teams.
Adobe InDesign CS5 and Adobe After Effects CS5 can also save projects to XFL format, allowing for new workflows. For example, you could start your project in After Effects, save it in XFL format, and then open the project in Flash Professional to continue building your user interface.
When it comes to creating and editing graphics, you can use the extensive features in Adobe Photoshop CS5, Adobe Illustrator CS5, and Adobe Fireworks CS5 to expand on the drawing tools provided in Flash Professional. Use Photoshop for sophisticated pixel-based image editing and then import your PSD file into Flash while maintaining your Photoshop file options (see Figure 1).
Figure 1. Import Photoshop dialog box in Flash Professional CS5.
Use the advanced vector drawing and editing tools in Illustrator to create complex layouts and then import your AI file while maintaining your Illustrator options (see Figure 2).
Figure 2. Import Illustrator dialog box in Flash Professional CS5.
Use the drawing, slicing, and optimization tools in Fireworks to render graphics and then import your PNG file while maintaining your Fireworks options (see Figure 3).
Figure 3. Import Fireworks Document dialog box in Flash Professional CS5.
Any vector graphics imported into Flash Professional are editable in the Flash workspace. You can launch Photoshop to edit bitmap graphics too; simply right-click the bitmap in the Library and select the option to Edit in Photoshop CS5. Alternatively, select the Edit option and choose Fireworks to launch it and begin making changes to the image.
For more information about working with assets created in Photoshop, Illustrator, Fireworks, and InDesign, see the Using imported artwork section of the Flash Professional online help.
You can automate graphics production and effects by using the range of tools and display object properties available in the Flash Professional workspace. For example, you can create complex geometric pattern effects using the Deco and Spray Brush tools. Or create drop shadows and bevel effects with filters or color effects with blend modes. You can specify a range of options in the Properties panel for each tool to achieve effects quickly that would be time-consuming to produce otherwise.
See the following sections of the Graphic Effects Learning Guide for more information:
The introduction of object-based motion tweening in Flash CS4 Professional opened the door for a handful of new automation features. Object-based motion tweens are represented in XML at their core, which means that their properties can easily be copied, saved, and reapplied to other objects. You can use your animations as templates whose attributes can be applied to other objects and then fine-tuned.
There are several options to copy motion XML: use the Copy Motion as XML command in the Commands menu or right-click the motion object and choose Save as Motion Preset from a list of animation automation options (see Figure 4).
Figure 4. Context menu for an object connected to a motion tween.
Choosing the Copy Motion as XML option allows you to copy the animation's attributes and paste them on to another object using Paste Motion. The Copy Motion as ActionScript 3 option allows you to copy the animation and paste it as an AnimatorFactory object in ActionScript 3. The Save as Motion Preset option allows you to save the animation attributes to the Motion Preset panel for use across projects.
To save a tween as a motion preset:
- Create a new ActionScript 3 FLA file and name it motion.fla.
- Name the default layer shape. Draw a shape on Frame 1 and convert it to a symbol (Modify > Convert to Symbol).
- Right-click the keyframe on Frame 1 of the shape1 layer and choose the Create Motion Tween option. Notice that 24 frames are automatically added to the Timeline.
- Change the physical properties of the shape at Frame 20 by moving it on the Stage and distorting its shape with the Free Transform (Q) tool. Notice the motion guide line that connects the two instances on the Stage; you can select the line and drag the handles to bend it into a curve, if desired.
- Right-click the keyframe and choose the Save as Motion Preset option.
- Enter a name for the preset in the Save Preset As dialog box and click OK. Open the Motion Presets panel and notice that your custom preset is saved in the Custom Presets folder (see Figure 5).
Figure 5. The Motion Presets panel, a new feature in Flash Professional CS5, allows you to choose default animation presets or create custom presets.
- To apply a saved preset, add an instance of a movie clip to the Stage on a frame that contains a keyframe. Select the instance on the Stage.
- Right-click the desired preset listed in the Motion Presets panel and choose the Apply at current location option.
- Export the SWF file (Control > Test Movie) to see the animations play.
- Save the file.
For more information on working with motion presets, see the Applying motion presets section of the Flash Professional online help.
The Actions panel in Flash Professional includes many improvements designed to make it easier to add ActionScript code to projects. Features include context-sensitive help, automatic importing of classes while data typing, and Script Assist mode—which generates the syntax of ActionScript as you use the interface to add statements to your scripts.
In addition to the recent updates to the Actions panel, be sure to check out the automation features in the new Code Snippets panel. Flash Professional CS5 introduces the Code Snippets panel as a utility to automate code production. A code snippet is a predefined ActionScript code block that provides a certain type of functionality (see Figure 6).
Figure 6. Categories of code snippets listed in the Code Snippets panel.
Code snippets can affect simple routines like controlling a timeline and adding event handlers to objects, or more complex routines, like animation and media playback. The general workflow includes selecting an object, naming its instance, and choosing a code snippet to apply to the object.
If you are new to working with ActionScript, the Code Snippets panel offers an easy way to learn the ActionScript syntax and start integrating code into your projects right away. The panel can also be used to save code snippets; if you write a lot of code, use this timesaving feature to save your custom scripts. Code snippets can be combined to create elaborate functionality to speed along development for all levels of projects and developers.
Code snippets for beginning ActionScript 3 programmers and designers by Yuki Shimizu gives a comprehensive overview of working with code snippets.
Flash Professional CS5 also offers new integration features for Adobe Flash Builder and Adobe Flex. Now you can create Flash Professional projects in Flash Builder 4 and later, which allows you to roundtrip your code-editing workflow and take advantage of the Flash Builder workspace for code editing. You can also use the new Convert Symbol to Flex Component command in Flash Professional to convert a movie clip symbol into a Flex-ready component.
You can get an overview of the Flash Builder and Flex integration features in my article, Combining animation with ActionScript using Flash Professional CS5 and Flash Builder 4.
Try experimenting by creating and applying reusable animations in the Motion Presets panel and reusable code in the Code Snippets panel. Check out these resources for additional information on code snippets:
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
More Like This
- Creating a simple animation in Flash
- Creating the Kuler panel for Flash CS3 Professional
- Formatting text for localized Flash projects
- Augmented reality using a webcam and Flash
- Multitouch and gesture support on the Flash Platform
- Building Preloaders and Progress Bars in Macromedia Flash
- Augmented reality with animated avatars using the 3D drawing API
- Using timeline labels to dispatch events with the ActionScript 3.0 TimelineWatcher class
- Optimizing Flash performance
- Using the Adobe Flash Sprite Sheet Generator