Articles Archive
Articles Search
Director Wiki

Relative filenames for linked members

November 12, 2000
by Pat McClellan

Dear Multimedia Handyman,

I am working on a Director CD that has video clips on it. I've imported them the usual way (linked to external files), they are placed directly on the stage as sprites and I'm working in Director 8. It all works fine from the projector when I run it from my hard drive, but when I burn the project to CD-ROM it can't find the video clip any more and asks me to locate it. Is there any way of checking what drive the cd is in (most cd drives are set to d - but my computer isn't) and setting the path of the video absolutely.


Dear Roberta,

There are methods of finding the CD-ROM drive, but the solution is much simpler. When you import a digital video member, the newly created cast member has a property called filename. Filename is simply the filepath to the external video file, including the name of the movie. So, for example, the filename of your video member might be something like this:


And let's assume that your Director movie is located one level up:


As long as you are running the movie from your hard drive, there is no problem. The movie can locate the QuickTime file by its absolute filename. The problem comes when you are ready to move this file onto a CD-ROM -- or any other machine. When you do so, the filename is inaccurate.

The easiest way to deal with this is to change the filename of the Quicktime member to a relative filename (rather than absolute). To do this, you'll need to use the / at / pathname operator. This allows us to specify the filename of the digital video file relative to the dir movie in which it appears. To make this change, import your digital video member. Select it in the cast and click on the blue "i" icon to open the Property Inspector. You will see the absolute filename displayed. Enter the relative filename instead. The relative path in my example would be the following:

 / at / video\

... or on the Mac...

 / at / 

(the Mac uses the colon rather than the backslash).

That's it. The odd thing is that when you make the change, then click outside the field, it appears to revert to the absolute filename. Don't worry: the change has actually been made, despite the fact that it appears to revert to absolute. I find this behavior damn annoying. To prove to yourself that it worked, save the Director movie and quit Director. Now move the whole movie directory (with the video directory inside it) to another spot on your drive. Re-open the dir file and look at the filename for the digital video member. You'll see that the new location is reflected in the filename.

I also find it odd that something so easy should have virtually no documentation. Take a look in the Lingo dictionary at the / at / (pathname) entry. There is some helpful info there, but no reference to using this with digital video, and no reference to setting it in the Property Inspector. I also can't find any technotes about it on Macromedia's site; if there is one there, it's elusive. It looks like we'll have to depend on each other, so pass it on.

Patrick McClellan is Director Online's co-founder. Pat is Vice President, Managing Director for Jack Morton Worldwide, a global experiential marketing company. He is responsible for the San Francisco office, which helps major technology clients to develop marketing communications programs to reach enterprise and consumer audiences.

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