Using Third-Party Text Tools


Sometimes it just makes more sense to use a third-party tool rather than beat your head against the wall trying to create a text effect that someone else has already figured out and packaged up for you. A number of tools available now let you quickly create text effects that would otherwise be very time- intensive to develop on your own. SWfX from Wildform Internet Media Software, and Swish from swishzone.com, are two of the better known of these, and both do a good job of creating a wide variety of effects. (See Figures 7.9 and 7.10.)

Figure 7.9. The Swish interface.

graphics/07fig09.gif

Figure 7.10. The SWfX interface.

graphics/07fig10.gif

Some of the SWFs created by these programs can be directly imported into your current movie; others have to be loaded as movies. You can directly import SWFs that were created using Flash 3level commands only. For effects that were developed using Flash 4 commands or higher, you need to load the SWF as a movie. Why? Because of what happens to an SWF file when you import it into Flash:

  • Everything in the SWF is flattened into one layer.

  • Animated graphic symbols are converted to frame-by-frame animations rather than tweens. The content of the frames is converted to new graphic symbols named Symbol 1, Symbol 2, and so on.

  • Only the first frame of any movie clip is imported. The rest of the movie clip timeline is ignored. Hence, any animation in the movie clip is ignored.

If you look at the source files for the SWfX effects, you'll see that many of the effects rely on using movie clips, which, of course, won't import as movie clips after they've been compressed into an SWF file. That's why you have to use the loadMovie() command. This is true for any SWF, whether created by a third-party tool or created natively in Flash.

How can you tell which files can be imported? Swish files don't contain embedded movie clips (at least, not in version 1.51), so you can directly import any of the Swish-created SWFs. When you create SWfX files, the effects that are Flash 3 level only are not highlighted in the effects list. If you use one of the highlighted effects, you'll need to load the final SWF file using loadMovie.

Whenever you import SWFs into your movie, it's a good idea to import them into movie clips rather than onto the main timeline. You'll find that this gives you much more flexibility.

Exercise 7.5 Importing and Loading Third-Party Effects

This exercise won't teach you how to use third-party software, but it will show you the options that you have for importing third-party SWFs into your movie. The lessons that you learn here will work for importing any SWF into your movie.

  1. Create a new blank movie.

  2. Because you know that you should always import external SWFs into movie clips, create a new movie clip (Ctrl+F8 or Command+F8) and name it Explode.

  3. While inside the Explode movie clip, choose File > Import and browse to explode.swf in the Chapter_07/Assets folder. Click Open.

    You'll see that you now have a frame-by-frame animation inside of your movie clip. (See Figure 7.11.) You can drag this movie clip from your Library and use it anywhere in your movie.

    Figure 7.11. When you import the Swish-generated file, you get a frame-by-frame animation.

    graphics/07fig11.gif

  4. Now do the same thing with an SWF that was created using Flash 4 commands. Create a new movie clip, and name it bigWave.

  5. While inside the bigWave movie clip, choose File >Import, and browse to bigWave.swf in the Chapter_07/Assets folder. Click Open.

    Whoa, there. Nothing but blank frames. That's no fun. You're going to have to use loadMovie to get this one to work.

  6. Create a new blank movie clip, and name it Placeholder.

  7. Drag a copy of the Placeholder movie clip onto the Stage, and give it an instance name (Window > Panels > Instance) of placeholder.

  8. Add a new layer on the main timeline, and name it Actions. Select frame 1 of the Actions layer, and launch the Actions panel.

    You need to tell Flash which movie clip you want to load into (target), how to do it (loadMovie), and what movie to load (bigWave.swf).

  9. In the Actions panel (set to Expert, Control or use Command+E), enter the following:

     placeholder.loadMovie("bigWave.swf"); 

    Alternately, you can enter:

     loadMovie("bigWave.swf", placeholder); 
  1. Now test your movie. (See Figure 7.12.) With your SWF file imported into the movie clip, you can move it wherever you need it on the Stage. Flexibility is the key here.

    Figure 7.12. You won't actually be able to see the movie you're loading until you test your movie.

    graphics/07fig12.gif

As mentioned earlier, I know that some of you will want to know how to create this type of effect yourself. You won't be happy using a third-party tool, and that's fine. But you'll have to play with ActionScript to make it work. The good news is that you can just steal the code here and modify a single movie clip to make changes.



Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net