cilia and flagella move...

In opposite directions of the cell membrane

When the bending of microtubules is powered by ATP

In the same direction of the cell membrane

When the contractions of the basal body triplets are powered by ATP

When the central pair of microtubules produce ATP