I've been told by Macromedia, and others, that it is not possible to switch the SHARED.DIR file on the fly using Lingo. This is just not so.
My solution for the changing of the SHARED.DIR is simple. It involves using many small SHARED.DIRs to compile a larger one. This works well from the kiosk side. I'm not sure if it has the same value from the CD perspective. Of course, this also allows for straight swapping of the SHARED.DIR file.
Using different folders for each shared movie, the main movie (hence called "main") will use the command:
play movie (the pathname:foldername:newsharedfile)Actually opening the movie that will become the SHARED.DIR file.
Upon playing this movie it executes a frame 1 script or on startMovie handler:
savemovie "the original pathname:shared.dir"
NOTE...this script must be stored in a cast number greater than the start of the shared file or bad things will happen.
This effectively overwrites the original shared file changing it for all other files to use. A "play done" returns to the original movie with the new shared movie ready for consumption.
Normally if you try to overwrite a SHARED.DIR you will get a nasty disk error message, because it is in use. However, because the new shared file is in its own folder and therefore does not see the original SHARED.DIR file, overwriting is a snap.
Now, this method can be used for simply swapping SHARED.DIRs or can be used in conjunction with the "duplicate cast" command to actually build the original movie from scratch. (that is what i use it for).
With the poor FileIO performance of director, first reading, analyzing, and then importing graphics, this new SHARED.DIR method is actually much faster. Besides, I was told that it couldn't be done. That's enough to make me want to do it.