You could create an extra variable, and for every moving update, you incrment it, when it reaches a certain value(have to try to figure that out for yourself), it updates the flashing object.