This post is a continuation of Implementing SlideDown effect – iteration 1. It is quite short since extraction of Slide base class and implementation of SlideDown, SlideUp, SlideLeft and SlideRight classes was really straightforward. Most of the code from iteration 1 was used as base classes (Slide and SlideInstance). Concrete effect classes simply declares instanceClass in constructor while concrete effect instance classes overrides onTweenUpdate() method to tween animation in a specific direction.
This implementation has one shortcoming, components are cropped to its width/height so if they have drop shadow or other filters enabled it may not be visible during animation. I will create Slide effect supporting filters in iteration 3.