A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5828 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


Random Links | Add your own Flash Related Links
Flash Tutorials 1280 Tutorials 7 New Tutorials Added!
What's New | Top100

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Tips_And_Techniques

Categories How to use an external .swf as a library
Author: FreshLaundry | Website: http://home.comcast.net/~freshlaundry |

 
Page 2
«prev 1 2

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:

shape_library.swf
-----------------
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'.

main.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:
attachMovie("square",1);
attachMovie("circle",2);
attachMovie("triangle",3);

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.

«prev 1 2

» Level Advanced

Added: : 2004-01-26
Rating: 8.41 Votes: 69
Hits: 1472
» 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.
Download (11 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs