Posted: Sat Mar 21, 2015 12:23 pm Post subject: Re: Urgent! Can't End Animation Instantly!
What is it you are trying to achieve?
Exit the Animation instantly and continues to next part of code!
What is the problem you are having?
Can't exit animation, it only stops it but it has delay.
Describe what you have tried to solve this problem.
I have tried changing delay time but it flickers after. I don't want that to happen.
Sorry about how I didn't answer the above questions. It didn't display.
Insectoid
Posted: Sat Mar 21, 2015 12:59 pm Post subject: RE:Urgent! Can\'t End Animation Instantly!
You're going to have to remove the delay and either redraw the same frame multiple times until enough time has passed to draw the next frame, or calculate how much time has passed since the last frame and draw the new frame based on that. For example, if you expect 10ms between frames and only 5ms have passed, then the elements in your animation will only move half as many pixels as they would have if 10ms had passed. It's a little tricky to get right, but I'm confident you can figure it out.
scratchykatty
Posted: Sat Mar 21, 2015 5:38 pm Post subject: Re: Urgent! Can't End Animation Instantly!
Can you give me an example of some code please. It would be most helpful.
scratchykatty
Posted: Sat Mar 21, 2015 5:46 pm Post subject: Re: Urgent! Can't End Animation Instantly!
how do you exit the loop automatically without waiting for the animation to finish?
Insectoid
Posted: Sat Mar 21, 2015 10:06 pm Post subject: RE:Urgent! Can\'t End Animation Instantly!
Quote:
Can you give me an example of some code please.
No, I can't. I've described what you need to do. Now it's your turn to try to turn it into code. If there is anything specific problems you run into while figuring it out, you can post back here and I'll guide you in the right direction.