Function createFlowControlWithAnimationAndLock