You could try a string array containing every stage of the dot pattern and having a for loop cycle through the elements.