views:

174

answers:

2

I'm trying to animate a list as I delete the top row. All the examples I can find use itemsChangeEffect to bind to the effect, but this property exists only in MX lists, not spark lists.

Any idea how I can get the same effect done in Spark Lists?

I'm trying to remove the top most item in the list with a slight fade out effect before the rest of the items move up to replace the gap.

+1  A: 

It is actually an effect, not a property. The internal implementation is very different, although the difference is masked when using them via MXML.

That said, this doesn't appear to be a feature of the Flex 4 List class. You can vote to have this feature added at ideas.adobe.com :

www.Flextras.com
My impulse is that you'd have to extend the Spark list to add the effect (not a property) to animate things. In The Flex Show premium screencast series I have an episode on creating a custom data effect. The same concept would be used here. You can also review the Halo code and see about applying that to Spark.
www.Flextras.com
A: 

They intentionally remove itemsChangeEffect from Spark because one of the new features in Spark is that layout logic is separated from component so you can implement your own custom list layout with add/remove effects on itemRenderer. When a Spark container measure() or updateDisplayList() method is called, the task of measurement and child arrangement is promptly delegated to a Spark layout instance.

dede
Look at http://coenraets.org/blog/2010/02/flexstore-revisited-building-an-animated-spark-layout/ for more detail
dede
Also look at the same question: http://stackoverflow.com/questions/1917566/whats-the-itemchangeeffect-equivalent-in-spark-list
dede