User Guide
82 Chapter 3: Writing Scripts in Director
You can edit linked scripts normally in the Director Script window. Changes you make are
written to the external files each time you save your Director movie. (If you imported the linked
script from a UNIX server, UNIX line endings are preserved.) If you import a script whose text
file is locked, you won’t be able to edit the script in Director.
You cannot apply custom text colors to linked scripts in the Script window. Script auto coloring,
however, is enabled for linked scripts.
To turn an internal script cast member into an external, linked script cast member:
1 Select the internal cast member and click the Script tab of the Property inspector.
2 Click Link Script As.
3 Enter a name for the script file in the Save As dialog box.
4 Click Save.
To reload a linked script after it is edited:
• Use the Member object’s unload() method.
If a linked script is edited outside of Director, you can reload it by using the
unload() method in
the Message window. The following statement causes the script member
myScript to be
unloaded and then reloaded:
-- Lingo syntax
member("myScript").unload()
// JavaScript syntax
member("myScript").unload();