Using Xtras in Shockwave


You've already seen how to use Xtras in standard Director movies and projectors, but using them in Shockwave is a bit different. Because of the security limitations imposed on Shockwave movies, not all Xtras are considered Shockwave safe. Specifically, Xtras that can access the user hard drive or have access to the OS are generally considered not Shockwave safe.

Although many of the common Xtras supplied by Macromedia are installed when the Shockwave plug-in is installed, any third-party Xtras you use will need to be enabled for downloading to the end user's system. Luckily, this is a simple process and requires only a couple of steps.

First of all, when you purchase Xtras for your project you need to be sure they are Shockwave safe. Once you are sure you can use the Xtra within your Shockwave movie, you need to place the Xtra's package information into the xtrainfo.txt file. That information will be supplied by the developer of the Xtra, and tells Director where the Xtra package can be downloaded.

Note

An Xtra package is a file specifically created for downloading. The package file can contain both Macintosh and Windows versions of the Xtras, though Director will only use the appropriate one.


As an example, the following entry from the xTRainfo.txt file lists the package information for the cursor asset Xtra:

 [#namePPC:"Cursor Asset", #nameW32:"Cursor Asset.x32", ¬  #package:"http://download.macromedia.com/pub/shockwave10/xtras/ ¬  CursorAsset/CursorAsset", ¬  #info:"http://www.macromedia.com/shockwave10/xtras/CursorAsset/ ¬  index.html"] 

Note that the form is a Lingo property list. Both the Windows and Macintosh names for the Xtra are listed, as well as the URL where the Xtra package can be downloaded. The URL for the info property is the location where the Xtra's help file is located. This lets you get help from within the Movie Xtra's List.

Once you have placed the information about the Xtra into the xtrainfo.txt file, the Xtra can be marked for download if needed within the Xtra's list, as shown here:

When you check the Download if Needed option, Director will verify the package URL by connecting to the Internetyou will need a working Internet connection to do this. If the package URL is verified, the URL is then stored in the movie:

Later, when the movie is placed on the Web, it will be able to download the Xtra, if it's needed, using the URL stored within it. Because the Xtra is stored on the end user's machine in the Shockwave plug-in folder, the Xtra will be available without downloading, the next time the user visits your site.

Let's now take one more look at adding background sound to the game, in the form of external audio.



Macromedia Director MX 2004. Training from the Source
Macromedia Director MX 2004: Training from the Source
ISBN: 0321223659
EAN: 2147483647
Year: 2003
Pages: 166
Authors: Dave Mennenoh

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net