actionscript 3 - Animating child elements in Flex 4 -
How does one alert the size / position of the basic elements of the layout in Flex 4?
Example:
I have a list component with custom layout. I want that when I change the condition of the hair elements, I want them to change their position in a new situation.
There is currently no plans to create animated layouts in Flex 4, nor have it been planned. /.
What I did to do this is "setLayoutBoundsPosition" and "layout bounds set in layout", instead of creating "move" and "resize" effect for each item in the layout, which actually width and height Set the matrix, clearly set. Then make sure the layout is not invalid again (which will be if you set the width / height directly), or you can start getting infinite loop. You may have to do some tips to do this right (I do not have to do a lot of work with spark effects, but it is easy to do with Tivner / TVMax because they have plugins and so on "setActualSize "Or" setLayoutBoundsSize ", etc.).
I use TweenMax to animate the layout, and they have some plugins to make this plugin easier. Twin Max looks like 3x faster (20 fps vs 7 fps) than Spark Effects, so I want to go with it. This looks like something in your code's updateDisplayList
method.
TweenMax.to (child, period, {setLayoutBoundsPosition: {x: childX * i, y: ChildY * i}});
Comments
Post a Comment