sync on
hide mouse
x = 320
y = 240
u = 1
l = 1
d = 0
r = 0
radius = 1000
decay# = 12
do
ink rgb(255,255,255),0
circle x,y,radius
circle 320,240,3
if leftkey() = 1 then l = 1 ; r = 0 ; d = 0 ; u = 0 ; decay# = 12
if rightkey() = 1 then r = 1 ; l = 0 ; d = 0 ; u = 0 ; decay# = 12
if upkey() = 1 then u = 1 ; d = 0 ; r = 0 ; l = 0 ; decay# = 12
if downkey() = 1 then d = 1 ; u = 0 ; r = 0 ; l = 0 ; decay# = 12
ink rgb(255,0,0),0
if decay# < 0 then decay# = 0
if l = 1 and decay# > 0 then x = x + decay# ; line 324,240,330,240 : if lenght(x,y,320,240) > radius then x=x-(decay#+1)
if r = 1 and decay# > 0 then x = x - decay# ; line 316,240,310,240 : if lenght(x,y,320,240) > radius then x=x+(decay#+1)
if d = 1 and decay# > 0 then y = y - decay# ; line 320,236,320,230 : if lenght(x,y,320,240) > radius then y=y+(decay#+1)
if u = 1 and decay# > 0 then y = y + decay# ; line 320,243,320,250 : if lenght(x,y,320,240) > radius then y=y-(decay#+1)
decay# = decay# - .3
sync
cls
loop
function lenght(x,y,x1,y1)
line_lenght# = sqrt((abs(y1-y)*abs(y1-y))+(abs(x1-x)*abs(x1-x)))
endfunction line_lenght#

hows that?

CTP