First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Mark White | Website: http://www.entriq.com/

Steps

Before diving into a step-by-step example, let's explore what we're going to achieve:

  1. We'll create a SWF movie that contains three simple movies in its library. This file acts as a library containing the movies that we want to dynamically load.
  2. We'll create a main SWF file that will load in the external library and it's symbols, then display them on-stage.

Step 1 - Creating a library movie

Open a new flash project (any stage-size will do) and perform the following steps:
  1. Choose Insert > New Symbol. Give it the name "box" and type "movie clip".
  2. Draw a box (any size).
  3. Choose Insert > New Symbol. Give it the name "circle" and type "movie clip".
  4. Draw a circle (any size).
  5. Choose Insert > New Symbol. Give it the name "line" and type "movie clip".
  6. Draw a diagonal line (any size).

We now have three new library symbols - each are movie clips. In order for these movie clips to be loaded (or "attached") dynamically, we need to add linkage names to these symbols.

Note: Whilst all library symbols can be export and linked to, only Movie-Clips can be accessed by ActionScript to dynamically load symbols. For this reason, all dynamically loaded symbols must be Movie-Clips. If you want to put a graphic (JPG, etc.) in your library, then put the graphic into an empty movie-clip, and export the movie-clip.


To export your library's movie clips, open up the library panel (Window > Library) and:

  1. Select the box symbol in the library list, right click and choose Linkage.
    Choose Export this symbol and type "box" into the Identifier field.
  2. Select the circle symbol in the library list, right click and choose Linkage.
    Choose Export this symbol and type "circle" into the Identifier field.
  3. Select the line symbol in the library list, right click and choose Linkage.
    Choose Export this symbol and type "line" into the Identifier field.
Note: It is crucial that you export symbols that you want to use from external movies. The linkage identifiers you give symbols are the names that these symbols are given when your work is published to a SWF movie. The names given to symbols in the library window are for authoring purposes only - they are not available to ActionScript

Lastly - save the movie as "library.fla" and then publish it to "library.swf". Pressing Shift+F12 is a good shortcut to publish your flash movie.

» Level Advanced

Added: 2001-10-29
Rating: 9 Votes: 105
(10 being the highest)
» Author
No details avialable.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • 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.