Why does this not work...
I'm trying to get the window to shake at a set variable rate called x
<SCRIPT LANGUAGE="JavaScript1.2">
x==1;
function shake_xy(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,x);
self.moveBy(x,0);
self.moveBy(0,-x);
self.moveBy(-x,0);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(x,0);
self.moveBy(-x,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,x);
self.moveBy(0,-x);
}
}
}
}
//-->
</SCRIPT>
Thanks
I'm trying to get the window to shake at a set variable rate called x
<SCRIPT LANGUAGE="JavaScript1.2">
x==1;
function shake_xy(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,x);
self.moveBy(x,0);
self.moveBy(0,-x);
self.moveBy(-x,0);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(x,0);
self.moveBy(-x,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,x);
self.moveBy(0,-x);
}
}
}
}
//-->
</SCRIPT>
Thanks