Hi,
I'm having problem when calling privileged method from setTimeout. First call is well fired but the others failed, someone know why ?
Thanks for your help.
I'm having problem when calling privileged method from setTimeout. First call is well fired but the others failed, someone know why ?
Code:
function MyObject( x, y, z ) {
this.StartMovement = function() {
// ...
DoMove();
// ...
}
function DoMove() {
alert( "Moving..." );
setTimeout( "DoMove()", 1000 );
}
}
// Test call
var Test = new MyObject( 0, 0, 0 );
Test.StartMovement();
Thanks for your help.