Jquery sound auto play without button
I have a setInterval that moves bulldozer from the right to the left.
If the car doesn't jump, the setInterval must stop itself after 5 seconds.
(used a setTimeout and clearInterval for that) but it's not working. can
anyone help me?
http://jsfiddle.net/B5MKj/8/
var gameover;
gameover = setInterval(function () {
if //the condition is true right now in the example..
{
setTimeout(function () {
clearInterval(movingbulldozer);
}, 5000);
}
}, 10);
No comments:
Post a Comment