for example if you want to animate your image dynamicly using the arrow keys:
ink 0,0
speed#=0.1
do
rem this line clears the screen to remove the previous image
box 0,0,screen width()-1,screen height()-1
paste image 1,x#,y#
if leftkey() then x#=x#-speed#
if rightkey() then x#=x#+speed#
if upkey() then y#=y#-speed#
if downkey() then y#=y#+speed#
sync
loop
or when you just want to animate your image along a mathematical function y=x²:
ink 0,0
speed#=0.1
x#=0
do
rem this line clears the screen to remove the previous image
box 0,0,screen width()-1,screen height()-1
paste image 1,x#,y#
y#=x#*x#
x#=x#+speed#
sync
loop
you can also combine multiple mathematical functions, for example y=x² and y=(x-2)²
then we want the image to follow the path of the first function for an x# range from 0 to 2, and the second function for an x# range starting from 2
ink 0,0
speed#=0.1
x#=0
do
rem this line clears the screen to remove the previous image
box 0,0,screen width()-1,screen height()-1
paste image 1,x#,y#
if x#<2
y#=x#*x#
else
y#=(x#-2)²
endif
x#=x#+speed#
sync
loop
offcourse you can change the speed# variable as you like
you'll also need to have loaded an image 1...
if the paste image command gives an error, you'll have to use
paste image int(x#),int(y#)
you could also store the x# and y# values in an array, in case you don't find a good function for the movement you want
rem initialise the array, for an animation with 100 frames
dim track#(100,1)
rem fill the array with the appropriate values (you can also make an editor in which you can draw a path for your image and store the coordinates in the array)
rem define the x coordinate for the first frame
track#(1,0)=5
rem define the y coordinate for the first frame
track#(1,1)=3
rem define the next frame
track#(2,0)=5.1
track#(2,1)=2.7
rem like this way you fill all elements of the array (like described above: you could write a program to do this automaticly)
ink 0,0
frame#=1
do
rem this line clears the screen to remove the previous image
box 0,0,screen width()-1,screen height()-1
x#=track#(frame#,0)
y#=track#(frame#,1)
paste image 1,x#,y#
frame#=frame#+1
sync
loop
note that you cant change the speed in the above method... to do this you can use this code (I just slightly adapted the above code)
rem initialise the array, for an animation with 100 frames
dim track#(100,1)
rem fill the array with the appropriate values (you can also make an editor in which you can draw a path for your image and store the coordinates in the array)
rem define the x coordinate for the first frame
track#(1,0)=5
rem define the y coordinate for the first frame
track#(1,1)=3
rem define the next frame
track#(2,0)=5.1
track#(2,1)=2.7
rem like this way you fill all elements of the array (like described above: you could write a program to do this automaticly)
ink 0,0
frame#=1
slowness=5
count=0
do
if count=slowness
rem this line clears the screen to remove the previous image
box 0,0,screen width()-1,screen height()-1
x#=track#(frame#,0)
y#=track#(frame#,1)
paste image 1,x#,y#
frame#=frame#+1
endif
count=count+1
sync
loop
in this case, the image will advance to the next frame every 5 frames (this method has the disadvantage that you can't use every possible speed, but you can also change the speed by using bigger/smaller differences between the induvidual keyframe's x and y coordinates)
I hope this was enough explanation

. But if you still have any questions; just shoot!
[href]www.bernardfrancois.com[/href]