------------------------------------------------------------
  Release Notes for Transform SWF for Java, Version 2.1.3.
------------------------------------------------------------

This a minor release fixing bugs.

Bug Fixes     
    FSDefineImage2: The encoding of the type and length always uses 6 bytes.     
    TextDump: NewFunction and NewFunction2 no longer decodes actions twice.     
	FSDefinedJPEGImage[2,3]: now allows null encoding tables.
	FSCoder: buffer is correctly resized when writing data.
	FSProtect: copy constructor can now be used when passwords are null.
	FSPlaceObject2: equals() now works on objects containing encoded clip events.
	
Class Changes:
    FSCoder context variable, version is now public.
    Encoded binary actions are now accessible.
    Classes are no longer final.
	
Testing Changes:
    Added test classes for FSProtect, FSShowFrame and FSSetBackgroundColor.
    Test images, fonts and Flash files are now included in the release.
	
Package Changes     
    The TestNG libraries are now included in the release.     
 
-------------
  Bug Fixes  
-------------

1. FSDefineImage2: The encoding of the type and length always uses 6 bytes.  

The type and length of each data structure can be encoded using either 2 bytes,
if the length of the encoded structure is less than 63 bytes or 6 bytes if it 
is longer. There is a bug in Flash that requires that the FSDefineImage class 
(DefineLosslessImage in the Macromedia specification) always uses the 6-byte 
form. This bug was also discivered to apply to the FSDefineImage2 class 
(DefineLosslessImage2). The class now always uses the 6-byte form.

2. TextDump: NewFunction and NewFunction2 no longer decodes actions twice.  

The definition of the NewFunction and NewFunction2 actions from Macromedia
contains a field that specifies the size, in bytes, of the encoded actions that 
make up the body of the function. These encoded actions are not part of the data 
structure but instead follow immediately  after the NewFunction[2] action.
  
In Transform the encoded actions are stored in an array internal to the 
NewFunction[2] action as this allows the developer to ignore the encoded length 
of the function body - the NewFunction[2] action calculates that when the 
objects are encoded.
  
The TextDump tool was decoding the actions that make up the body of the function
twice. The result was that the actions appeared as part of the function 
definition then again as a series of actions following the function definition.
This is now fixed.

3. FSDefinedJPEGImage[2,3]: now allows null encoding tables.  

The documentation for the FSDefineJPEGImage2 and FSDefineJPEGImage2 classes
state that a null reference can be used when creating objects with empty 
(undefined) encoding tables. This was incorrect and a NullPointerException would
be throw.

The classes have now been fixed to allow this. Passing a null reference will
create an empty table containing only the StartOfImage (0xFFD8) and EndOfImage  
(0xFFD9) markers.

4. FSCoder: buffer is correctly resized when writing data.

When writing data that would overflow the internal buffer maintained by the 
FSCoder the size is adjusted automatically. The buffer was adjusted by 50% of 
the current size. However if the volume of data being written was greater than 
this figure an overflow would occur and an ArrayIndexOutOfBoundsException 
would be raised.

The buffer is now resized by 50% + the size of the data being written so making
sure that overflows will not occur.

5. FSProtect: copy constructor can now be used when passwords are null.

The copy constructor no longer throws a NullPointerException when copying 
objects that do not contain a string with an MD5 password.

6. FSPlaceObject2: equals() now works on objects containing encoded clip events.

The equals() method now correctly takes into account the comparison performed
on all of the objects attributes.

-----------------
  Class Changes  
-----------------

1. FSCoder context variable, version is now public.

The FSCoder class uses an array of integers to pass information across the 
object hierarchy when encoding and decoding Flash files. The version variable
which contains the version of Flash that the objects are being encoded/decoded
for is now public to support the unit test classes in the package 
com.flagstone.transfrom.test.

This variable has very little use outside of testing. Other context variables
will be made public as more test cases are developed.

2. Encoded binary actions are now accessible.

The method 

    public byte[] getEncodedActions() 
    
was added to the following classes:  FSButtonEvent, FSClipEvent, FSDefineButton, 
FSDoAction and FSInitialize to allow access to actions encoded as binary data.

3. Classes are no longer final.

The final keyowrd has been removed from all classes in the franework allowing
them to be sub-classed.

-------------------
  Testing Changes  
-------------------

1. Added test classes for FSProtect, FSShowFrame and FSSetBackgroundColor.

The FSProtectTest, FSShowFrameTest and FSSetBackgroundColorTest were added to
the com.flagstone.transform.test package to perform unit testing of the 
FSProtect, FSShowFrame and FSSetBackgroundColor classes respectively. TestNG
scripts to run the unit tests for each of the classes was added to the 
test/suites directory.

2. Test images, fonts and Flash files are now included in the release.

Files for testing the classes in Transform that process images and fonts are 
now included in the distribution. All the files are available under licences
that permit redistribution.

In addition a set of Flash files are included. Each file contains encoded data 
structures for one class in the com.flagstone.transform package allowing the 
encoding and decoding of objects to be verified using files generated by third-
party tools.

-------------------
  Package Changes  
-------------------

1. The TestNG libraries are now included in the release.  

TestNG is used to perform testing on the classes in the framework. Rather than 
having to download them separately from www.testng.org, the JAR files are now
included in the release. Thanks to Cedric Beust and the TestNG team for allowing
this.
