Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Can’t make circle to move Re: Can’t make circle to move

#134838
Kuzyo
Participant

Hi @Mottie!

Thanks, but why this condition doesn’t work

if (currentMarginLeft < bodyWidth) {
timerLeft = setInterval(moveLeft, speed);

} else {
clearInterval(timerLeft);
};

‘ for me it seems: if currentMarginLeft < bodyWidth start Interval if not stop Interval