Articles Archive
Articles Search
Director Wiki
 

What Xtras Should I Include?

May 9, 2001
by Will Turnage

Dear Multimedia Handyman,

When creating a projector I shouldn't include authoring Xtras because it may slow down start time. Is there a list of these so I know not to include them into my XTRA folder? Thank you,

Sean

Sean,

If you've ever looked inside the Xtras folder next to your Director installation, it can be quite a scary, intimidating mess. Director ships with over 60 Xtras, and if you're like me, you have a nice complement of third party Xtras thrown into the mix to make it even more confusing.

But what a lot of people don't realize is that half of these Xtras don't add any functionality to Director projectors, instead they're used in authoring mode to create dialog boxes, or to add some other capability to Director such as the Save As Java feature. These authoring Xtras include such curiously named items as the ZipXtra and the Squish Files Xtra, and it's nearly impossible to find any documentation on what they are or how they work. Typically, the only way you can figure out that you need them is if they're removed from the Xtras folder and you get an error message asking you to put the missing Xtra back in the folder.

With that in mind, if you want your projectors as small and optimized as possible, rather than eliminate the authoring Xtras from the mix, you should only include the Xtras that you know your projector needs. And Director can help you find out most (or sometimes all) of the Xtras used in your project.

You can find out the Xtras in your movie by selecting Modify -> Movie -> Xtras from Director's menu. If you start with a blank movie, often it will look like this:

These are the default Xtras included in your project. Next, you should add these six things to your movie's cast: a text member, an embedded font, a vector shape, an external sound file, a Quicktime movie, and an external PNG file. Now if you select Modify -> Movie -> Xtras you will see a much longer list of Xtras. If you scroll down, it will look like this:

This list contains all of the Xtras that Director needs to display every cast member in your movie. You can try to remove some of these new Xtras from the dialog box, but the next time you open it, they will reappear in the list until you've deleted all of the corresponding members from your cast.

So if you use the Xtras dialog box, you can instantly know most of the Xtras that your project will need. I said most, because there are a few Xtras that don't show up here by default. These are the Xtras that are used solely in your Lingo code. For instance, if you use the FileIO Xtra, or FileXtra3 in any of your projects, they won't ever show up automatically in the Xtras window because Director can't tell from your code that you're using them.

But that doesn't stop you from adding the Xtra to the list yourself. To add the FileIO Xtra to the list, just click on the Add... button in the Xtras dialog box, select the FileIO Xtra, and then click OK. By doing this, you will be able to remember that you're using FileIO in this project without having to search through all of your code looking for Xtras. This small step can save you (or another developer working with you) valuable time in the final mastering stages of a project.

The other time when Director won't automatically detect Xtras is when you're using code to switch external media members. Say your assignment is to make a picture viewer. When you run the picture viewer, you should be able to select any picture off your hard drive and then have Director display it on screen. The most likely way you would do this is by having one bitmap in your movie, and then changing it's filename to the new image selected by the user.

If you had originally used a JPEG in your movie, then Director would have added the JPEG Agent Xtra to your list of Xtras. But at runtime, if you ended up selecting an Animated GIF or a PNG file to view, the projector would give you an error. The error would happen not because of anything wrong in your code, but because you didn't have the Xtras in your folder that let you view GIF files or PNG files.

The way around this error is to create a quick sample movie that does have all these media members in it, and then look at its list of Xtras. To do this, just create a blank Director movie, and then import a wide assortment of media types into your movie, making sure that you have selected the Link to External File option in the import dialog box. Try to get everything from TIFFs and PICTs to PNGs and GIFs. When you're done linking to these external files, then view Director's Xtra list and you will see all the Xtras you would need to include in your Xtras folder for your program to work properly.

Will Turnage is a multimedia programmer based in New York City. In addition to his weekly role as Director Online's Multimedia Handyman, he is also the Technology Director for Sony Music's Client Side Technologies Group. You can read more about his work at http://will.turnage.com/.

Copyright 1997-2024, Director Online. Article content copyright by respective authors.