A good idea but what if you want 2 glidescripts on the same page?
and then you can create multiple gliders
function glider(text, sx, sy)
this.startX = sx;
this.startY = sy;
this.text = text;
glider.prototype.glideTo = function(x,y)
this.endX = x;
this.endY = y;
alert("Start at " + this.startX + ":" + this.startY);
alert("Move to " + this.endX + ":" + this.endY)
myGlider1 = new glider("Hello World", -100, -100);
myGlider2 = new glider("Welcome", -100, 0);
myGlider3 = new glider("Some More Text", 0, -100);
It is just a pity that there seem to be very few public scripts that use OO methods to learn from.
I have some links somewhere to how to create OO scripts. I'll post them when I find them.
Here is an example Multiple xeyes.