UBB.Dev
Posted By: Willie McSweeney Problem with JS - 09/01/2002 4:43 AM
I cant seem to figure out why the following wont work:

moveAdude('guy',new Array(37,37,40,40))

function moveAdude(dude,cords) {
setTimeout("moveAdude("+dude+","+cords+")",401)
}

after the setTimeout calls for it again it changes the values of dude from "guy" to [object] and cords to 37
I want it to just return the same value each time.
Posted By: Matt Jacob Re: Problem with JS - 09/01/2002 7:24 AM
Try this:
Code
moveADude('guy', new Array(37,37,40,40))

function moveADude(dude, cords)
{
setTimeout(moveAdude(dude, cords), 401)
}
© UBB.Developers