Also bei mir ist es so, dass ich mehrere Bilder nacheinander anzeigen lasse, so ähnlich wie Powerpoint.
Mit Pfeil Links und Rechts lässt sic hdie Bildid verändern, also Bild davor, näxchstes Bild.
Bloß reagiert Keyboardreleased sehr sporadisch auf die EIngaben, irgendwelche Vorschläge?
Code: Alles auswählen
Enumeration
#bild1
#bild2
#bild5
#bild3
#bild4
EndEnumeration
Global bildid
Global bildx
Global bildx
Global zaehler
bild1.s="C:\hallotestordner\hallo.bmp"
bild2.s="C:\hallotestordner\hallo2.bmp"
bild3.s="C:\hallotestordner\hallo3.bmp"
bild4.s="C:\hallotestordner\hallo4.bmp"
bild5.s="C:\hallotestordner\hallo5.bmp"
zaehler=1
mouse=0
InitSprite()
InitMouse()
InitKeyboard()
OpenScreen(1024, 768, 32, "Die Simpsons - Kurzreferat")
LoadSprite(#bild1, bild1)
LoadSprite(#bild2, bild2)
LoadSprite(#bild3, bild3)
LoadSprite(#bild4, bild4)
LoadSprite(#bild5, bild5)
Repeat
Select zaehler
Case 1
bildid = #bild1
Case 2
bildid = #bild2
Case 3
bildid = #bild3
Case 4
bildid = #bild4
Case 5
bildid = #bild5
EndSelect
bildx = 1024-SpriteWidth(bildid)
bildx = bildx/2
bildy = 768-SpriteHeight(bildid)
bildy = bildy/2
ExamineMouse()
ExamineKeyboard()
ClearScreen(0,0,0)
DisplayTransparentSprite(bildid, bildx, bildy)
FlipBuffers()
If KeyboardReleased(#PB_Key_Right)
zaehler+1
ElseIf KeyboardReleased(#PB_Key_Left)
zaehler-1
EndIf
;Delay(0)
Until KeyboardPushed(#PB_Key_Escape)
