This applet demostrates the use of a Toggle node to alternate between two animations.

Click on the object to start the first animation. When it stops moving, click again to start the second animation.

Open the scene file, models\toggle_animation_test.s3d, in a text editor to see how this is done.