THe following program shows a ball bouncing on the left wall.
GraphicsWindow.FillRectangle(0,0,20,400)
GraphicsWindow.BrushColor="Red"
GraphicsWindow.PenColor="Red"
ball=Shapes.AddEllipse(20,20)
x=300
y=400
dx=1
Controls.Move(ball,x,y)
for i=1 to 400
x=x-dx
y=y-1
if x<20 Then
dx=-dx
EndIf
Controls.Move(ball,x,y)
Program.Delay(10)
EndFor