How can i stop an Animation when the Program still works under a FOR statement--->for
(i=0;i<1000;e++).
I have Start Button
And Stop Button.
I want to clear directly the Animation, not untill the for-Statement finisched.
Printable View
How can i stop an Animation when the Program still works under a FOR statement--->for
(i=0;i<1000;e++).
I have Start Button
And Stop Button.
I want to clear directly the Animation, not untill the for-Statement finisched.
Use the break; statement inside the for loop.
In the sample code that you have provided, (i) variable doesn't get incremented
instead (e) gets incremented. [I'm not sure sometimes u may have incremented
the (i) var inside the loop :) ]
Hiranya Samarasekera
[www.theFutureMinders.com]
----------------------------------
"Mounir" <abbas@gmx.de> wrote:
>
>How can i stop an Animation when the Program still works under a FOR statement--->for
>(i=0;i<1000;e++).
>I have Start Button
>And Stop Button.
>I want to clear directly the Animation, not untill the for-Statement finisched.
"Mounir" <abbas@gmx.de> wrote:
> Dear;
do not use "for loop" in the main thread for animation, because it will block
the System, rather make a new thread which will handle the animation
>How can i stop an Animation when the Program still works under a FOR statement--->for
>(i=0;i<1000;e++).
>I have Start Button
>And Stop Button.
>I want to clear directly the Animation, not untill the for-Statement finisched.