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

Hour 19. Designing Your Web Site to Be M... > Task: Start Using a Shared Item

Task: Start Using a Shared Item

In this task you'll create a user file that can access the contents of the Shared Library you created in the previous task. Here are the steps:

Create a new file (Ctrl+N) and select Save As…. Name the file user1.fla and save it in the RuntimeSharing folder (from the previous task). Now you have to get those shared items into the new movie. You could copy instances from the shared.fla—but this would involve first creating instances (by dragging from the Library) and then pasting into user.fla. I think an easier way is to open shared.fla as a Library. To do that, make sure you're editing user1.fla and select File, Open as Library and then select shared.fla. You'll see the Library from shared.fla, but notice that it's darkened a bit to represent that it's from another file. You can now use instances from this movie without adding to the file size of the user1.fla file.

Drag items from shared.fla's Library to the Stage of user1.fla. Drag the bitmap onto the Stage. Then open the Library for user1.fla (Ctrl+L) and notice that the bitmap looks like it was copied into the Library. Now, try dragging the sound from the shared.fla's Library to user1's Library. Finally, drag the “box” onto the Stage. File user1.fla now seems to have three items added to its Library (see Figure 19.8). However, these are really just instances pointing to the master version in the file shared.fla.

Figure 19.8. After you bring assets from a Shared Library into a user file, they appear to be included in the user file's Library.

Go ahead and double-click the “box” clip in your user1.fla movie. You'll see a dialog box like the one shown in Figure 19.9. Click No. The point is that you can only make edits to the master when you open shared.fla. By the way, you can drag instances from user1's Library onto the Stage, and you're still using instances of the masters saved in shared.fla.

Figure 19.9. Trying to edit a clip set up for runtime sharing will cause this dialog box to appear. It basically says that if you want to edit the clip here, it won't be linked any more. Editing the original is done through the source movie.

Do a Test Movie and then look at the file sizes. The shared.swf file should be rather large (it has a bitmap, sound, and Movie Clip). The user1.swf file should be tiny, because it only points to the shared.swf file. By the way, if you move or change the name of shared.swf, the file user1.swf won't work!

While you're inside user1.fla take a look at the linkage settings under each item's linkage properties. You should see “Import for runtime sharing” selected as well as the identifier and URL fields filled in. These settings mean that, when exported, this movie will look in the file shared.swf for items with the identifier listed.



Not a subscriber?

Start A Free Trial

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