Spark List中的itemChangeEffect相当于什么? [英] Whats the itemChangeEffect equivalent in Spark List?

查看:159
本文介绍了Spark List中的itemChangeEffect相当于什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在flex 3中,使用List组件,您可以将一个效果添加到itemChangeEffect属性,允许您在列表控件中添加/移除项目的动画。



火花列表中的equiv看起来是rendererAdd和Removed事件,但是这不能完全控制这个效果,因为一旦事件被分派,删除就完成了,所以没有时间来达到效果。 / p>

有人知道如何在火花列表上完成同样的工作吗?

解决方案

<看看这个答案在堆栈溢出:在Flex 4中动画子元素Flex 3 List中已经包含了itemChangeEffect / dataChangeEffect,他们必须在List组件中做很多的自定义配置,可能。因为Spark是一个更新,更好的架构,他们没有包括任何效果处理的组件,所以你不能做像itemChangeEffects的东西。



你可以,但是,是在您的布局创建效果。如果你想创建一个 AnimatedVerticalLayout ,你所需要做的就是扩展VerticalLayout并覆盖updateDisplayList,然后使用TweenMax为你的项目进出状态动画。这不是很容易:但是这是你现在唯一能做的。一旦有人自动化这个过程,它会很快。



祝你好运!



看看这个例如:动画TimeMachine布局通过 Gilles Guillemin 。他有一些好东西。


In flex 3, with List component, you could add an effect to the itemChangeEffect property, allowing you to animate the addition/removal of the items in the list control.

The equiv in the spark list appears to be the rendererAdd and Removed events, but this doesn't allow complete control over the effect, since removal is done as soon as the event has been dispatched, allowing no time for the effect.

Does anyone know how to accomplish the same on a spark list?

解决方案

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.

这篇关于Spark List中的itemChangeEffect相当于什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆