Offline Authoring
During authoring in Director 4 and 5, net Lingo commands (such as goToNetMovie
, etc) generate error
messages because they are supported only by the Shockwave plug-in. To avoid error messages
and speed up offline authoring, you can define your own handlers
for net Lingo commands in order to intercept them.
There are a few ways to handle this.
1. You can simply add scripts that are stored in a separate castlib to your movies during authoring to
trap the netLingo commands. For example:
on goToNetMovie
alert "now going to a new movie"
end
View or download a set of handy interceptor scripts written by Alan Levine at the
Maricopa Web site.
2. It is also possible to build a trap into all of your net Lingo scripts that tests whether
a Director movie is running locally or via the Shockwave player. The version string differs for
Shockwave and Director so that it can be used to determine the playback environment. For example:
if string(version) contains "net" then
initForShockwave
else
initForLocal
end if
3. If you always process Shockwave movies through Afterburner for playback over the Web,
all of your Shockwave movies should have a .dcr file extension. Therefore, you can add a line of
Lingo that tests for the filename extension to determine whether the movie is a Shockwave (.dcr) file
or a local (not .dcr) file. This is not a foolproof method because Shockwave can
display .dcr, .dir, and .dxr files within the browser. However, it works if, as a rule, you
always compress Shockwave files using Afterburner. Here's the simple Lingo:
if the movieName contains ".dcr" then
initForShockwave
else
initForLocal
end if
NOTE: Director 6 should include built-in support for net Lingo commands.