napsternapster Posted July 2, 2009 Share Posted July 2, 2009 Hey Guys, I have problem with a javascript function.I have a group of images inside a div the div must move to the left without pausing every interval. function AutoPlay_1() { clearInterval(MoveTimeObj_1); if(MoveLock_1) return; MoveLock_1 = true; MoveWay_1 = "right"; AutoPlay_1(); MoveTimeObj_1 = setInterval('ISL_ScrDown_1()',Speed_1) } The bellow function is the one function that tell the div to move to the left function ISL_ScrDown_1() { if(GetObj('ISL_Cont_1').scrollLeft >= GetObj('List1_1').scrollWidth) { GetObj('ISL_Cont_1').scrollLeft = GetObj('ISL_Cont_1').scrollLeft-GetObj('List1_1').scrollWidth; } GetObj('ISL_Cont_1').scrollLeft += Space_1; } instead of using setInterval as follows: MoveTimeObj_1 = setInterval('ISL_ScrDown_1()',Speed_1) anyone who can help on how to call the ISL_ScrDown_1() without using setInterval Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.