here it is:
dim posx#(1000)
dim posz#(1000)
dim yrot#(1000)
do
text 40,40,"replay demo by jopie dopie."
text 40,60,"use the arrow keys to move the object, press space to see"
text 40,80,"your replay or wait till the movieframe is 1000"
text 100,100,"press space"
if spacekey()=1 then exit
loop
sleep 1000
sync on
sync rate 0
make object cube 1,100
autocam off
position object 1,0,0,0
position camera 0,200,200
point camera 0,0,0
do
sync
frame=frame+1
if frame=999 then goto replay
if spacekey()=1 then goto replay
posx#(frame)=object position x(1)
posz#(frame)=object position z(1)
yrot#(frame)=object angle y(1)
if upkey()=1 then move object 1,1
if downkey()=1 then move object 1,-1
if leftkey()=1 then yr#=wrapvalue(yr#-3)
if rightkey()=1 then yr#=wrapvalue(yr#+3)
yrotate object 1,yr#
set cursor 0,0
print "FPS: ";screen fps()
print "movie frame: ";frame
loop
replay:
do
sync
cls
set camera view 0,0,1,1
center text 320,240,"OK the movement is recorded now, press space to see"
sleep 500
if spacekey()=1 then exit
loop
cls
set camera view 0,0,640,440
text 30,460,"REPLAY *"
maxframes=frame
for movieframe = 1 to maxframes
set cursor 0,0
print "FPS: ";screen fps()
print "movie frame: ";movieframe
position object 1,posx#(movieframe),0,posz#(movieframe)
yrotate object 1,yrot#(movieframe)
sync
next movieframe
cheers
if I = 1 then I = 1 else I = 0