Whats the itemChangeEffect equivalent in Spark List?

安稳与你 提交于 2019-11-30 21:04:11
Lance Pollard

Check out this answer on Stack Overflow: Animating Child Elements in Flex 4.

Flex 3 Lists had the itemChangeEffect/dataChangeEffect baked into them, and they had to do a LOT of custom configuration inside of the List component to make that possible. Because Spark is a lot newer and a lot better architected, they have not included any effect processing in the components, so you can't do things like itemChangeEffects.

What you CAN do, though, is create effects in your layouts. If you wanted to create an AnimatedVerticalLayout, all you need to do is extend their VerticalLayout and override updateDisplayList, and then use TweenMax to animate your items in and out of their state. It's not very easy :/ but it's the only thing you can really do right now. Once someone automates this process though, it'll be a snap.

Good luck!

Check out this example: Animated TimeMachine Layout by Gilles Guillemin. He has some good stuff.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!