Avoiding Shared Library Headaches


You already know that if a Shared Library is corrupted or missing, all the Flash movies depending on it for shared elements stop playing. That's why it's important to keep the size of your Shared Libraries as small as possible and to use Shared Libraries only when it's really necessary.

There are a couple of other not-so-well-documented issues surrounding Shared Libraries that can cause you some serious aggravation. If you know what they are ahead of time, however, you can work around them.

  • You can't attach ActionScript to a button on the Stage if that button was brought in from a Shared Library. You can, however, attach ActionScript to the button in the Shared Library and import that button, ActionScript and all, into your movie. That'll work just fine.

  • The attachMovie action, with which you become acquainted in later chapters, enables you to retrieve a copy of a movie clip from the Library and load it into another movie clip. However, it does not work with a Shared Library item. If you are planning to use the attachMovie action in your file, the movie clip you want to use must be in your internal Library.

Now you know how to create Shared Libraries and some of the caveats about using them. You also have the option of creating custom Permanent Libraries that become part of your Flash application.



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