openfl/swf — pull request #33 by Horsetopus (2014-10-16 15:00:00+00:00)
Title: Issues with colorTransform and filters

Basically the same issue as the pull request #20

If there is a lastTag, but no colortransform / filterslist info on it, you shouldn't resolve to the firstTag.

My guess, a tag is created if one of the parameters of the movie clip is changes ( at least transform.colorTransform, transform.matrix, filterlist, also maybe blendMode, visibility and others ).
But the lastTag doesn't always contain all those parameters, just the modified ones.

Quick fix: what I did and what was done in the pull request#20 for transform.matrix.
If there is a last tag, but no value for one of the parameter, instead of falling back to the state of the first frame, just keep what is actually set.
In normal playback it works fine, but I am not sure of the replications if you play backward, or come from a gotoAndStop.

Better fixes:
1 / I don't know where the tags are written, but you could make sure to fill all the parameters in the last tag, never letting them empty.
2/ For each parameter, parse back the list of tags from the current frame until you find something.
I don't know witch one would affect the more the performances though.