Date: Thu, 20 Nov 1997 13:39:48 -0800 From: Greg YachukI've written a few times about the gotcha's of using external files in a cross-platform production. Following are a couple of reposts, one from June 1997 and one from February 1997.Subject: Re: Problem with linked files in D5 (Urgent Help!)
The first one gives a recipe for making sure that all your files can be found. The second one tries to explain how we locate files. This might give you insight into any problems that you may be having.
The most common problem that I've seen is that a .dir file has been saved somewhere (like to the Desktop) and then moved to the intended folder. While this seems like a good idea (so you don't clobber your original file) it plays havoc with the code in Director that resolves pathnames at runtime.
BTW, I searched the Direct-L archives from the director-online search page, looking for the keywords "greggy" and "path". I got around 39 hits and in there should be the answer to just about any question you have about pathnames in Director. Good luck.
There are a number of things that can go wrong.
For example, if you have your .dir files on one drive and all your content on another, everything will continue to work on your development systems, but you will be unable to locate content when run on other systems.
Another thing that can go wrong is to save your .dir or .cst files to some location and then use the Finder/Explorer to move them to the different folders. Director records the location that the file was last saved to and uses that to try to construct relative paths.
Here is a recipe for making things go smoothly.
If you really want to copy the files, rather than moving them, you have several alternatives. As I said above, the goal is to make sure that Director can only find the files that you want found, not other copies. You can disconnect the disks with the copies or you could do all this on an external drive which you can move to a system which doesn't have any other copies of files.
Once this has been done, your disk should contain an image that is ready for burning to CD. It should work on any drive on both Mac and Windows systems.
There is one "gotcha" in Director 4 and 5, whereby you are prompted for a pathname and the one that is displayed has a mixtures of colons and backslashes, but it doesn't sound like you are having this problem. If you do, make sure that you preload the cast member before setting the filename.
However, when you open a movie in Director or load a cast member in a projector, we try to resolve all references to files. We always store the full path to where the Director movie (or cast if external casts are used) and the full path to each linked cast member. Basically, we do the following:
So the short answer to your question is "you don't need relative paths for linked files, you really need absolute paths which is what you have."
Also, Doug Smith responded that he was having problems using the "@" notation. The most common problem is caused by changing the "relative paths" between movies or between a movie/cast and linked files. For instance, many people keep their movies and linked files in separate folders. This is normally fine and Director keeps track of the links.
However, if you are working on a movie and do a "Save As..." to the desktop or some other temporary location and then manually move the file back into the original folder, you will have problems when transferring the production to another OS.
The best thing to do when transferring a production over to another OS is to Update Movies before transferring. Also, if you are asked to locate files during Update Movies, make sure you actually locate them. If you cancel, the original links are retained which will cause the lookup to continue to fail. A bit of clarification: Cancelling out doesn't hurt your movie in any way. It's just that if you cancel out of looking up files, you can expect to have to look it up anyways when you get to the other system. At that point, you have to make sure that you catch all possible references. It is simply much easier, much more complete and all-around much better karma to do this in Update Movies.
Greg Yachuk
Macromedia Director Engineer
"What's so Great about the Barrier Reef? And what's so Fine about Art?"