[JS] vaag foutje

Pagina: 1
Acties:

  • D-RiSe
  • Registratie: September 2000
  • Laatst online: 19-03 19:37

D-RiSe

Kick the baby

Topicstarter
code:
1
2
3
4
5
6
7
8
9
function move(toRight, toLeft, up, down, speed) {
    this.x += parseInt(toRight);
    this.x -= parseInt(toLeft);
    this.y -= parseInt(up);
    this.y += parseInt(down);
    this.css.left = this.x;
    this.css.top = this.y;
    setTimeOut("this.move(" + toRight + ", " + toLeft + ", " + up + ", " + down + ", " + speed + ")", speed);
}

"Object expected" in de regel setTimeout...etc etc

intel silver reef, celly 2.0 Ghz, 256mb ddr, G2MX


Verwijderd

Op vrijdag 12 oktober 2001 13:16 schreef D-RiSe het volgende:
code:
1
2
3
4
5
6
7
8
9
function move(toRight, toLeft, up, down, speed) {
    this.x += parseInt(toRight);
    this.x -= parseInt(toLeft);
    this.y -= parseInt(up);
    this.y += parseInt(down);
    this.css.left = this.x;
    this.css.top = this.y;
    setTimeOut("this.move(" + toRight + ", " + toLeft + ", " + up + ", " + down + ", " + speed + ")", speed);
}

"Object expected" in de regel setTimeout...etc etc
Niet setTimeOut, maar setTimeout :).

  • D-RiSe
  • Registratie: September 2000
  • Laatst online: 19-03 19:37

D-RiSe

Kick the baby

Topicstarter
GVD, das al de 2e vandaag die ik gewoon verkeerd typ

bedankt

intel silver reef, celly 2.0 Ghz, 256mb ddr, G2MX