English 中文(简体)
Whats the itemChangeEffect equivalent in Spark List?
原标题:

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.

问题回答

暂无回答




相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

热门标签