First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: FreshLaundry | Website: http://home.comcast.net/~freshlaundry

How To Link to External Libraries

Let's say I have a file called "shape_library.fla" which has movie clips with all of the shapes I want to use in my movies. Then I have a file called "main.fla" where I want to use those shapes as I see fit, without being limited to where I want load them.

The trick is this:

circle - export for actionscript, label: circle
triangle - export for actionscript, label: triangle
square - export for actionscript, label: square
export_linker - export for runtime sharing, URL: shape_library.swf

Setting up my library, I have my shapes exported and labeled as you would expect. But then I add an EMPTY movie clip set to 'export for runtime sharing', URL: 'shape_library.swf'.

import_library - import for runtime sharing, shape_library.swf -> export_linker

I set an EMPTY movie clip called 'import_library,' set it to 'import for runtime sharing', browse to my "shape_library.fla" file, and select the 'export_linker' object. I also set it to 'update automatically.' I now have a linked object to my library file.

import_linker - export for runtime sharing, label: import_linker

Now I create an EMPTY movie clip, put an instance of 'import_library' INSIDE this movieclip and set it to 'export for actionscript'. I give it a label, but the label doesn't really matter.

The thing is, once you do this, you NEVER need to reference 'import_linker' at all. It just magically makes all the shapes available to actionscript.

In the main movie, you can now use:

and it will be able to pull the items from the library, for you to use anywhere.

You can add as many links to external libraries as you need. All it takes is a few empty movie clips.

AMAZING?!? I thought so.

If you have any questions, feel free to ask.

» Level Advanced

Added: 2004-01-26
Rating: 7.9 Votes: 70
(10 being the highest)
» Author
FreshLaundry is an advanced Flash developer who is out of work, so has time to figure things like this out.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.