The animate function (and animatefast, animateslow, animateCustom) can animate any atribute. And any attribut can refer to an other attribute. This way to animate changes the custom atribute Anim and any X child's attribute refer to this Anim parent's attibute.
You should imagine Anim attribute like a timeline, 5000 frames long in this example, controled with OnClick = animatecustom(Anim,5,,,0,5000). I used animcustom to set de duration (5 seconds).
Then, you must make childs animation sequences like on any timeline based animation or film making:
TimeLine.jpg
For each child you must define the time range of animation (with two if statements), the start and stop attribute values and transform Anim value to right value range and give it to the right attribute with a "Anim to Attribute" equation.

Attribute = IF (Parent!Anim>StartFrame, IF (Parent!Anim<EndFrame, Anim2AttribEqu, EndValue), StartValue)

In this example, the Comp2 must start to move at Anim = 1000 and stop at anim = 2000, so the child attribute (X in this case), the start position is X=0 and end position is X = 1000, and Anim to X equation is X = Parent!Anim-1000 (when Anim = 1000, X = 0 and when Anim = 2000, X = 1000)

X = IF (Parent!Anim>1000, IF (Parent!Anim<2000, Parent!Anim-1000, 1000), 0)

I hope it's clear enough... πŸ˜‰