locked
Animation delay RRS feed

  • Question

  • I'm trying to make some animations, but the rest of the program has to wait for theese to finnish. The problem is that neither Program.Delay nor a loop works. It just freezes the program for some amount of time. Isn't there any way to make the program wait for the animation?
    AME
    Sunday, July 25, 2010 7:06 AM

Answers

  • Use move instead for animate and move it 1 pixel at a time and then use a while loop with a delay of 10 milliseconds or look at STARGATES game loop is probably your best bet.

     

    EDIT: I seem to have miss read your post... maybe set a timer to run and have a while loop wait until the timer comes back and changes the state. surely Program.Delay should delay the rest of the execution tho. But as you can see above i don't use animate :)

    • Marked as answer by Cider2000 Sunday, July 25, 2010 3:19 PM
    Sunday, July 25, 2010 9:51 AM

All replies

  • Use move instead for animate and move it 1 pixel at a time and then use a while loop with a delay of 10 milliseconds or look at STARGATES game loop is probably your best bet.

     

    EDIT: I seem to have miss read your post... maybe set a timer to run and have a while loop wait until the timer comes back and changes the state. surely Program.Delay should delay the rest of the execution tho. But as you can see above i don't use animate :)

    • Marked as answer by Cider2000 Sunday, July 25, 2010 3:19 PM
    Sunday, July 25, 2010 9:51 AM
  • Thanks! Definitely works :D
    AME
    Sunday, July 25, 2010 3:20 PM