Define Your Motion Point
I've attached the green car to Point A. (Notice that my time variable is 't' and not 't0.') More on that later. You can change the size of the image by determining the location of the corners. Be sure you define your image using the motion point (Point A in this case).
When to End Animation
At this point, t0 should have a minimum of 0, but the maximum is whatever you arbitrarily decided upon when you started the applet. Now we have to decide when to end the animation. I decided to let the animation end when the Green Car (Point A) reaches the finish line (variable 'f'). All we do here is use the distance formula to determine when the race ends. So basically, we want to know when...
(v1)(t0) + s1 = f
...which simplifies quite nicely to
t0 = (f-s1)/v1
So regardless of how we change our variables, this is when the race will end.
Change the maximum for 't0' to 1 and make the increment '0.01.'
Now that everything is in place, hide all of the sliders by right clicking and selecting "show object" so they don't show up in the applet.
Save the ggb and jar files
Exporting to .html will result in about 6 different files. Make sure to save them in the same folder. The two files you're most interested in are the .html and .ggb files.
Go to the folder and right click on the .html file and open with Word Pad.
Select all of the code, delete it and replace it with this animation code. From here, all you need to do is change the red text according to your title, slider names, variable descriptions and initial values.
Make sure to save and then double click on the html file and you should get something that looks like this:
If there is anything I need to clear up, don't hesitate to ask.