Implementing Slide effects – iteration 2

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.

The following example demonstrates all SlideRight, SlideLeft, SlideDown and SlideUp effects.
View source is enabled, you can download zipped sources from here.

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.

Share on Google+Share on FacebookShare on LinkedInPin on PinterestTweet about this on Twitter

3 thoughts on “Implementing Slide effects – iteration 2”

  1. I have a button.Clicking on the button will pop out me multiple alert message(bcoz user clicking the button for multiple times) in the page itself.I am using to display alert message. I have already tried to hide the button after first click but still it’s not working for me.So kindly give some sample code on the below mail id

Leave a Reply

Your email address will not be published. Required fields are marked *