Archive

Archive for January, 2010

Flex 4 - DataGroup data provider change effects

January 13th, 2010

I haven’t had a blog post in quite a while but figured this might be useful to someone and will illustrate how to achieve various effects using a DataGroup with TileLayout,VerticalLayout and HorizontalLayout.

When using filtering on your dataProvider the DataGroup recreates all it’s items instead of just repositioning renderers that are remaining thus you must do something like I did.

The basic premise for doing this is grab the start values of each element in the datagroup, filter your collection,cause the datagroup to validate and turn off the autoLayout for the datagroup, setup your effects from old to new values for moving the items, play the effects, then turn autoLayout back on when all effects are complete.

Some notes : I am not sure if this is a bug or not but using the same effect with a List doesn’t work very well if your doing the Scale and Rotate, move seems to work with List instead of DataGroup.

License:MIT License

Sample

Source Code

Flex, Flex 4 , ,