Hello,
include "asm.inc"
Window 640,400,1
LoadImage "bmp/pic1.bmp"
LoadSprite "bmp/bird.bmp",8
single x, y=200
int w = ScrW, z
while Key(27)=0
ImageBlend 1,0,0,640,400,10
Color 255,20,25
Text 120,0,20,"Constrain Example"
y = 200+100*sin(rad(x))
Sprite 1,x,y,48,48,z
y = 200+100*cos(rad(x))
Sprite 1,x,y,48,48,z
iF Constrain(x, 0, w) >0
x +=2
Else
x = 0
End iF
z +=1: if z=8 then z=0
Redraw
Wait 20
Wend
WinEnd
.