Chapter4 Example9: added generic animations