Zitat von TheEmulatorGuy
Well, if you want each frame of the smilie to last for 8 milliseconds, you'd do this:
[HTML]
frame_1 = Image.load("frame_1.png")
frame_2 = Image.load("frame_2.png")
frame_3 = Image.load("frame_3.png")
screen:clear()
while (true) do
--Put image to memory and flip it to screen
screen:blit(0, 0, frame_1)
screen.flip()
--Keep frame showing for 8 milliseconds
screen.WaitVblankStart(8)
--Clear screen to start over
screen:clear()
screen:blit(0, 0, frame_2)
screen.flip()
screen.WaitVblankStart(8)
screen:clear()
screen:blit(0, 0, frame_3)
screen.flip()
screen.WaitVblankStart(8)
screen:clear()
end
[/HTML]
There's probably an error in there somewhere, but that should be a fair idea of how you do it.