Vielleicht grafisch nicht gerade der Brüller, aber so ungefähr kannst Du mit Speicherbitmaps flackerfreie Animationen basteln. Und ein bißchen verbessern, dann klappt das auch besser mit der unabhängigen Bewegung der Einzelteile.
WindowStyle 536
CLS
Declare Takt%, Zahl1%, Zahl2%, Zahl3%, Zahl4%, Zahl5%
Var Start% = Create("Button", %HWnd, "Start", 4, 4, 64, 32)
Var Images% = Create("hPic", 0, "TOOLBAR")
Var Bitmap% = Create("hNewPic", 128, 32, RGB(255, 255, 0))
Proc AniMalen
Startpaint Bitmap%
If TestBit(Takt%, 0)
CopyPic Images%, Zahl1% * 16, 0 - 16, 16 > 4, 4; 0
Inc Zahl1%
Case Zahl1% > 4 : Zahl1% = 0
EndIf
If TestBit(Takt%, 1)
CopyPic Images%, Zahl2% * 16, 0 - 16, 16 > 22, 4; 0
Inc Zahl2%
Case Zahl2% > 4 : Zahl2% = 0
EndIf
CopyPic Images%, Zahl3% * 16, 0 - 16, 16 > 40, 4; 0
Inc Zahl3%
Case Zahl3% > 4 : Zahl3% = 0
CopyPic Images%, Zahl4% * 16, 0 - 16, 16 > 58, 4; 0
Inc Zahl4%
Case Zahl4% > 4 : Zahl4% = 0
If TestBit(Takt%, 2)
CopyPic Images%, Zahl4% * 16, 0 - 16, 16 > 76, 4; 0
Inc Zahl5%
Case Zahl5% > 4 : Zahl5% = 0
EndIf
Endpaint
EndProc
Proc BildMalen
DrawPic Bitmap%, 2, 64; 0
EndProc
Proc StartProc
SetTimer 15
Takt% = 80 + Rnd(250)
Zahl1% = Rnd(5)
Zahl2% = Rnd(5)
Zahl3% = Rnd(5)
Zahl4% = Rnd(5)
Zahl5% = Rnd(5)
EnableWindow Start%, 0
CLS
EndProc
Proc TimerProc
AniMalen
BildMalen
If Takt%
Dec Takt%
Select Takt%
CaseOf 1
KillTimer
SetTimer 300
CaseOf 2
KillTimer
SetTimer 150
CaseOf 3
KillTimer
SetTimer 90
CaseOf 4
KillTimer
SetTimer 60
CaseOf 5
KillTimer
SetTimer 40
OtherWise
EndSelect
Else
KillTimer
EnableWindow Start%, 1
DrawText 8, 100, "Bild 1 = " + Str$(Zahl1%)
DrawText 8, 116, "Bild 2 = " + Str$(Zahl2%)
DrawText 8, 132, "Bild 3 = " + Str$(Zahl3%)
DrawText 8, 148, "Bild 4 = " + Str$(Zahl4%)
DrawText 8, 164, "Bild 5 = " + Str$(Zahl5%)
EndIf
EndProc
While 1
WaitInput
If %Key = 2
Break
ElseIf %Key = 255
Case GetFocus(Start%) : StartProc
ElseIf %wmTimer
TimerProc
EndIf
EndWhile
DeleteObject Bitmap%
DeleteObject Images%
Alles anzeigen
Gruß Volkmar