I'm trying to do very simple effects in a layout (move and rotate in 3D, using AnimateTransform), and it's forcing update of the layout when the animation starts and when it completes, which I don't want.
Here's the gist of the effect, where "targets" are all the GroupBase's children:
// capture start values from the targets
effect.targets = targets;
if (effect is Animate) //
(effect as Animate).disableLayout = true;
(effect as AnimateTransform).applyChangesPostLayout = true;
(effect as Effect).propertyChangesArray = (effect as Effect).captureValues(null, true);
var n:int = (effect as Effect).propertyChangesArray.length;
for (var i:int = 0; i < n; i++)
(effect as Effect).propertyChangesArray[i].end = properties[i]
If I set "disableLayout" to true, when the animation is complete, it sets "autoLayout" to true on the parent, which causes the layout to run again. If I set "disableLayout" to false, then it updates the layout every time a property changes.
How do I get around this?
I did my own custom "capture start" "capture end" functions to avoid the LayoutManager.getInstance().validateNow() calls in the Effect.as class.