Sorry, can´t manage that.
I´v got a script here which works with one layer. I did a
workaround using a timout; but that´s not what I want.
Maybe you could help me with this one:
<HTML>
<HEAD>
<script language="JavaScript">
<!--
IE4 = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion) >= 4;
NS4 = navigator.appName.substring(0,8) == "Netscape" && parseInt(navigator.appVersion) >= 4;
// checkBrowser() -- Checks whether the browser is new enough for some DynamicMovement ...
function checkBrowser(){
if(IE4 || NS4){
return true;
}
return false;
}
// movableObj() -- Creates a new movable object
function movableObj(startX, startY, endX, endY, delay, speed, refId){
this.sX = startX; this.sY = startY; this.eX = endX;
this.eY = endY; this.de = delay; this.sp = speed;
this.ref = refId;
xL = endX - startX;
yL = endY - startY;
with (Math){
if(abs(xL) > abs(yL)){
this.xS = (xL > 0)?1:-1;
this.yS = (yL > 0)?abs(yL / xL):-abs(yL / xL);
this.howManySteps = abs(xL / speed);
} else if(abs(yL) > abs(xL)){
this.yS = (yL > 0)?1:-1;
this.xS = (xL > 0)?abs(xL / yL):-abs(xL / yL);
this.howManySteps = abs(yL / speed);
} else {
this.yS = (yL > 0)?1:-1;
this.xS = (xL > 0)?1:-1;
this.howManySteps = abs(xL / speed);
}
}
this.startMovement = startMovement;
}
// startMovement() -- starts the movement
function startMovement(){
if(checkBrowser()){
if(IE4){
ref = document.all(this.ref).style;
} else {
ref = document[this.ref];
}
doDynamicMovement(this.sX, this.sY, this.eX, this.eY, this.de, this.xS, this.yS, ref, this.sp, this.howManySteps);
}
}
// doDynamicMovement() -- does the Dynamic Movement
function doDynamicMovement(curX, curY, eX, eY, sp, xS, yS, ref, speed, hS){
if(Math.floor(hS - 1) != 0){
hS--;
curX += xS * speed;
curY += yS * speed;
ref.left = Math.round(curX);
ref.top = Math.round(curY);
setTimeout("doDynamicMovement(" + curX + ", " + curY + ", " + eX + ", " + eY + ", " + sp + ", " + xS + ", " + yS + ", ref, " + speed + ", " + hS + "

", sp);
} else {
setPos(eX, eY, ref);
}
}
// setPos() -- sets the end position accurately when doDynamicMovement has done its job
function setPos(x, y, ref){
ref.left = x;
ref.top = y;
}
function anfang(){
Bild1.startMovement();
setTimeout("Bild2.startMovement()", 1500);
setTimeout("Bild3.startMovement()", 2500);
setTimeout("Bild4.startMovement()", 4000);
}
// -->
</script>
</HEAD>
<BODY onLoad="anfang()" bgcolor="white">
<div id="bild1" style="position: absolute; left: -300; top: -150; width: 150px;
height: 150px"><img src="1_1.jpg" width="150" height="150"> </div>
<div id="bild2" style="position: absolute; left: 300; top: -150; width: 150px;
height: 150px"><img src="1_2.jpg" width="150" height="150"> </div>
<div id="bild3" style="position: absolute; left: 900; top: -150; width: 150px;
height: 150px"><img src="1_3.jpg" width="150" height="150"> </div>
<div id="bild4" style="position: absolute; left: 1200; top: -150; width: 150px;
height: 150px"><img src="1_4.jpg" width="150" height="150"> </div>
<script language="JavaScript">
<!--
// Here we define the movable object
Bild1 = new movableObj(-300,-150,150,100,20,20,"bild1"

;
Bild2 = new movableObj(300,-150,300,100,20,20,"bild2"

;
Bild3 = new movableObj(900,-150,450,100,20,20,"bild3"

;
Bild4 = new movableObj(1200,-150,600,100,20,20,"bild4"

;
// -->
</script>
</BODY>
</HTML>