beautypg.com

Sharing library assets across files – Adobe Flash Professional CC 2014 v.13.0 User Manual

Page 321

background image

Sharing library assets across files

To the top

Sharing library assets at runtime
Sharing library assets at author-time

Sharing library assets at runtime

About runtime shared library assets

Shared library assets let you use assets from one FLA file in another FLA file. This can be useful in these situations:

When more than one FLA file needs to use the same artwork or other assets.

When a designer and a developer want to be able to edit artwork and ActionScript code in separate FLA files for a joint project.

Sharing library assets works like this:

For runtime shared assets, assets from a source document are linked as external files in a destination document. Runtime assets are loaded
into the destination document during document playback—that is, at runtime. The source document containing the shared asset does not
need to be available on your local network when you author the destination document. The source document must be posted to a URL for
the shared asset to be available to the destination document at runtime.

Tutorials and videos

Tutorial:

Runtime Shared Library Tutorial

(Flash CS4, includes some ActionScript 3.0, source: slekx.com)

Working with runtime shared assets

Using runtime shared library assets involves two procedures. First, the author of the source document defines a shared asset in the source
document and enters an identifier string for the asset and a URL (HTTP or HTTPS only) where the source document will be posted.

Second, the author of the destination document defines a shared asset in the destination document and enters an identifier string and URL
identical to those used for the shared asset in the source document. Alternatively, the destination document author can drag the shared assets
from the posted source document into the destination document library. The ActionScript version set in the Publish settings must match that of the
source document.

In either scenario, the source document must be posted to the specified URL for the shared assets to be available for the destination document.

Define runtime shared assets in a source document

To define sharing properties for an asset in a source document and make the asset accessible for linking to destination documents, use the
Symbol Properties dialog box or the Linkage Properties dialog box.

1. With the source document open, select Window > Library:

2. Do one of the following:

Select a movie clip, button, or graphic symbol in the Library panel, and select Properties from the Library Panel menu. Click Advanced.

Select a font symbol, sound, or bitmap, and select Linkage from the Library Panel menu.

3. For Linkage, select Export For Runtime Sharing to make the asset available for linking to the destination document.

4. Enter an identifier for the symbol. Do not include spaces. This is the name Flash Professional uses to identify the asset when linking to the

destination document.
Note: Flash Professional also uses the linkage identifier to identify a movie clip or button that is used as an object in ActionScript. See
Working with movie clips in

Learning ActionScript 2.0 in Adobe Flash

or

Working with movie clips

in the ActionScript 3.0 Developer’s Guide.

5. Enter the URL where the SWF file containing the shared asset will be posted, and click OK.

When you publish the SWF file, you must post the SWF file to the URL you specified so that the shared assets are available to destination
documents.

Link to runtime shared assets from a destination document

You can link to a shared asset by entering its URL or by dragging the asset into the destination document.

Link a shared asset to a destination document by entering the identifier and URL

1. In the destination document, select Window > Library.

314