If you have experience using both Director and Macromedia Flash, you're no doubt aware that Flash simply does certain things better. Flash's drawing tools make Director's look like a stone-age hammer and chisel. Motion tweening is often smoother in Flash. Resizing, rotation, and skewing of bitmaps are smoother as well ( Figure 11.1 ). Text in Flash can be stretched , squeezed, and rotated . Making rollover buttons is a piece of cake. And the list goes on.
Figure 11.1. A bitmapped image rotated in Director and in Flash. As you can see, Flash rotates bitmaps more smoothly.
Of course, there are also lots of things that Director does better than Flash. (See "Who uses Director?" in the introduction to this book.) Fortunately, you don't have to choose between the two: If you have both products, you can use them together to create a movie that has the best features of each.
Use Flash to create the elements that look better in Flashanything from a single vector image to a complex, animated, interactive movie. You can publish the Flash movie as an SWF file, then import the SWF file into Director. All of the SWF file's featuresincluding any ActionScript it may containfunction in Director just as they do in Flash. It's not necessary for Flash to be installed on your computer (or on the computers of those to whom you distribute your movies) for Flash sprites to function in Director.
Tips on Exporting from Flash
Director users tend to use Flash in two different ways. Sometimes, they create a full-fledged movie in Flashincluding animation and possibly interactivitywith the intention of playing it on the Director Stage. In this case, Flash plays a role similar to that of video-editing programs such as Adobe Premiere or Apple's Final Cut Proas a tool for producing self-contained cast members with time-based content.
At other times, Flash is used to create high-quality vector cast members that you can then animate in Director. In this case, you can use Flash as a substitute for an image-creation program such as Adobe's Photoshop or Illustrator.
If you're planning on creating a Flash movie and exporting it to Director, there are several things you can do in Flash MX to make your movie work better in Director:
If the movie includes digital video files, delete them. (You'll get better performance by importing them separately as Director cast members).
Edit the movie's scripts to remove any use of the loadMovieNum command to load movies into levels above Level 0. (The movies won't load in Director.)
Set the frame rate of the Flash movie to be no faster than the frame rate of the Director movie you'll be importing it into.
Choose File > Publish Settings, and deselect the Compress Movie option (to avoid memory problems in Director).
You can then export an SWF file from Flash in any of the usual ways: by choosing Control > Test Movie, File > Publish, or File > Export Movie.
In the second casein which you want to export only a vector image, with no animation or interactivitythe best way to do it is to follow these steps:
Make the Stage as small as possible, following the steps in the "Optimizing the Flash Stage" sidebar, later in this chapter.
If any of the objects you want to export are symbols with scripts attached to them, delete the attached scripts.
In the Timeline, select the frame that you want to export. (If your movie has only one frame, this obviously isn't necessary.)
If there are any frame scripts attached to the selected frame, delete them.
Choose File > Export Image. (The advantage of Export Image over Export Movie is that it exports only the frame you've selected.)
The Export Image dialog box opens ( Figure 11.2 ).
Figure 11.2. In Flash MX's Export Image dialog box, select the Flash files you want to import into Director.
Select Flash Movie from the Format pop-up menu. (Even though you're only exporting a single frame, the SWF file is still considered a "movie.")
From this point on, you can continue the export process as you would with any other Flash movie. The result will be a single-frame SWF file.
When you import the resulting file into Director, be sure to select the Static option on the Property Inspector's Flash tab. (See "To set a Flash cast member's properties," later in this chapter.)