Base64 Xtra v1.0.0
18-May-2001

Base64 Xtra v1.0.0 is a Scripting Xtra for use with Macromedia Director v7 or later.

Base64 Xtra performs base64 encoding and decoding of arbitrary binary strings into text strings that can be safely emailed or posted. The encoding scheme is defined in RFC 1521 (MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies, section 5.2, ``Base64 Content-Transfer-Encoding'') and is used for MIME email and various other Internet-related applications. 



Target platforms:

Windows 95/98/2k/NT


How to use it:

Simply drop it into the Xtras folder or directory that your copy of Director uses.


To get a quick overview of the available functions, type the following into Director's Message window:

	put interfacet(xtra "base64")



Method Summary:

New ( Xtra "base64")

Creates a new base64 Xtra instance.


base64register(string registercode)

Register Base64 Xtra, Once you've registered your copy of Base64 Xtra, pass your registercode to this method to get rid of the warnings, which you will receive with the registered package. You have to call this method once during the lifetime of your application, before calling any of the other Base64 Xtra methods. Be sure to protect the base64register() call so your registercode will not be exposed to the public.


base64encode(object me, string input, string output)

Parameters :

object me : Base64 Instance.

input : input filename .
output: output filename.

Encode the contents of the input file and write the resulting base64 encoded data to the output file.


base64decode(object me, string input, string output)

Parameters :

object me : Base64 Instance.

input : input filename .
output: output filename.

Decode the contents of the input file and write the resulting binary data to the output file.


Example:

Base64 encode:

b64Instance=new(xtra "base64")
base64encode(b64Instance,"C:\test.jpg", "C:\test.txt")


Base64 decode:

b64Instance=new(xtra "base64")
base64decode(b64Instance,"C:\test.txt", "C:\test.jpg")


Documentation and program are copyright (c) 2001 by: David Hu




