Simple question. I want to create a loop suitable for animation and I want the loop to end when Done = true. I have tried using a TTimer component, but this does not work. The code at the moment is as follows:
AnimTimer.Enabled := true;
while Done = true do
AnimTimer.Enabled := false;
Done := false;
However the while loop causes the program to freeze so that nothing happens. At the moment, the animation routine is not looped, but is attached to AnimTimer's OnTimer event. It is important that the code after the line where the Animation routine is called is not executed until Done = true. Has anyone got any ideas?