Flagstone Software

13214. Clip events are not re-encoded correctly.

If a Flash file containing event handlers for movie clips (clip events) is decoded, modified and encoded then the encoded file will not be displayed correctly. The problem is an internal field which indicates the offset in bytes to the end of the clip event data structure. This offset is 1 byte larger than it should be. The result will be clip event structures that are not decoded correctly and so the flash file will not player correctly. If you try to decode the file again then an overflow error will be reported.

Root Cause

The problem was introduced in release 2.1.6 when the way actions were encoded were changed to handle cases where end of action markers were encountered in the middle of an array of actions. Previously the offset to the end of the clip event was initialised to 1 to account for the implicit end of action marker. In 2.1.6 an end of action marker was explicitly added but the offset was not initialised to 0. As a result the offset was 1 byte larger than necessary.

Workaround?

There is no workaround however the source code can be updated to correct the problem. In FSClipEvent change line 514 from:

int offset = 1; // End of actions marker
to intialise the offer to zero:
int offset = 0;

When will it be fixed?

This was fixed in Transform 2.2.1 released on 01-Mar-2008