• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 11. Working with Sounds > Loading a Sound from a Shared Library

Loading a Sound from a Shared Library

By default, Flash embeds audio files directly into the published (.swf) file. You have the option of loading audio files from a common Library. This gives you the advantage of using the same sounds in several Flash movies at the same time. For example, you create a Web site using fifteen separate Flash movie files, and each one uses the same background music. Rather than embed the same sound fifteen times, you can simply load the sound, when needed, from a common Library. Shared libraries are simple Flash documents that are set up to share their files between several Flash movies. The process is easy, and the rewards are great, and you don't increase the file size of Flash movies using shared Library elements. Once you've created and defined a Flash document as a shared Library, you can use the items in other Flash movies without increasing the size of the Flash published .swf file.

Create a Shared Audio Library

Create a new Flash document.

Add the audio files to the document's Library. They do not have to be placed on the Stage.

Click the File menu, and then click Save. Use a distinctive name for the source document.

Select an audio file in the Library.

Click the Library Options button, and then click Linkage.

Select the Export For Runtime Sharing check box.

Enter a distinctive name for the Identifier field or use the default.

Enter the name of the published document into the URL field.

Click OK.

Repeat steps 4 through 9 until all the audio files are correctly linked.

Click the File menu, and then click Publish to create the Flash .swf file.

Close the original source file.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint