using
for the image.
This works:
while this doesn't:
I don't know why ? Am I right in asserting flip and cls should only be called once within a program? Any ideas or tips ?
for the image.This works:
Graphics 800,600,32 'load an image to tile image=LoadImage("flake.png") duration=500 'millisecs = 1/2 sec dx=1 dy=1 timer=MilliSecs() While Not KeyHit(KEY_ESCAPE) TileImage image,x,y 'move the tiled background x=x+dx y=y+dy If MilliSecs()>timer+duration dx=-dx dy=-dy timer=MilliSecs() End If Flip;Cls Wend
while this doesn't:
Graphics 800,600,32 'load an image to tile Global image=LoadImage("flake.png") While Not KeyHit(KEY_ESCAPE) function1() Flip;Cls Wend Function Function1() TileImage image,x,y duration=500 'millisecs = 1/2 sec timer=MilliSecs() dx=1 dy=1 'move the tiled background x=x+dx y=y+dy If MilliSecs()>timer+duration dx=-dx dy=-dy timer=MilliSecs() End If End Function
I don't know why ? Am I right in asserting flip and cls should only be called once within a program? Any ideas or tips ?