User Guide

137
CHAPTER 7
Scripting Objects
The scripting objects, also known as Xtra extensions, in Macromedia Director MX 2004 provide
access to the functionality of the software components that are installed with Director and extend
core Director functionary. The preexisting Xtra extensions provide capabilities such as importing
filters and connecting to the Internet. If you know the C programming language, you can create
your own custom Xtra extensions.
For an illustration of how the scripting objects relate to each other and to other objects in
Director, see “Object model diagrams” on page 53.
Fileio
Enables you to perform file input and output operations.
You can create a reference to a Fileio object by using the
new operator.
-- Lingo syntax
objFileio = new xtra("fileio")
// JavaScript syntax
var objFileio = new xtra("fileio");
Method summary for the Fileio object
Method
closeFile() readFile()
createFile() readLine()
delete() readToken()
displayOpen() readWord()
displaySave() setFilterMask()
error() setFinderInfo()
fileName() setNewLineConversion()
getFinderInfo() setPosition()
getLength() status()
getOSDirectory() version()