FileIO Parent

Overview

This parent script provides a quick way to read and write plain text files within projectors. The script is a wrapper for the built-in FileIO Xtra.

Quick Links

Requirements

  • Macromedia Director 7.0 or greater

Details

Advanced users and lingo programmers will probably already have made one of these. This script is targeted towards beginners and intermediate users.

Primarily, it simplifies two things:

  1. Opening plain text files for reading and writing
  2. Dealing with the correct line terminator depending on the platform (ie: CR/LF vs CR vs LF)

The script provides this basic functionality:

  1. opening a file (#read, #write or #append mode)
  2. reading a line of text (with option to strip CR/LF characters)
  3. writing a line of text (with option to append CR/LF characters)
  4. checking if we are at/past the end of the file
  5. getting / setting file pointer position, getting length of file
  6. requesting the current error status

I consider this a work in progress. Additional functionality can easily be added, and there may be some platform-specific issues to be resolved (this was written and tested on a Windows-platform machine). Please feel free to offer suggestions.