Jump to content

scrolling images using javascrip


napsternapster

Recommended Posts

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

 

:)

 

Link to comment
https://forums.phpfreaks.com/topic/164494-scrolling-images-using-javascrip/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.