I have a flag flapping in the breeze. It has 10 frames in the animation. Right now it increments 1 frame per pass through the main loop.
Whoa nelly - It looks like there is a hurricane a blowin!
I would like the flag to switch frames 1 time each 3 or 4 passes through the main loop.
There can be no delays in the main loop so using Delay or CreateTimer will not work.
What is the best way to overcome this problem?
(edit) I figured out a way to do it but would welcome any better ideas.
Thanks
Whoa nelly - It looks like there is a hurricane a blowin!
I would like the flag to switch frames 1 time each 3 or 4 passes through the main loop.
There can be no delays in the main loop so using Delay or CreateTimer will not work.
What is the best way to overcome this problem?
(edit) I figured out a way to do it but would welcome any better ideas.
If frame=9 frame=0 If flt=>1 DrawImage flag,280,10,frame 'Note: This routine keeps the flag from flapping too fast. EndIf 'Variable flt (flagTimer) gets incremented at the bottom If flt=>3 'of the Repeat/Until loop. DrawImage flag,280,10,frame frame:+1 flt=0 EndIf
Thanks