left - right horizontal scroller

M

marco

Hi !
I have this part of code and i can not find out why the scroller is starting
from left to right instead RIGHT to LEFT.
This is the main part and the scroller is working fine but from the wrong
side.

//------------------------------------------
function
start(){if(document.getElementById){tdiv6=document.getElementById('slider');
firstns6();}
else if(document.all){tdivie=slider;firstie();}else
if(document.layers){tdivns4=document.slider1.document.slider2;firstns4();}}
function
firstns4(){tdivns4.document.write('<nobr>'+imagef+'</nobr>');tdivns4.documen
t.close();thel=tdivns4.document.width;tdivns4.left=-thel;slidens4();}
function
slidens4(){if(tdivns4.left<=swidth){tdivns4.left+=sspeed;setTimeout("slidens
4()",100);}else{tdivns4.left=-thel;slidens4();}}
function
firstie(){tdivie.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdivie.offsetWid
th;tdivie.style.pixelLeft=-thel;slideie();}
function
slideie(){if(tdivie.style.pixelLeft<=swidth){tdivie.style.pixelLeft+=sspeed;
setTimeout("slideie()",100);}else{tdivie.style.pixelLeft=-thel;slideie();}}
function
firstns6(){tdiv6.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdiv6.offsetWidt
h;if(operbr!=-1){document.getElementById('opslider').innerHTML='<nobr>'+imag
ef+'</nobr>';thel=document.getElementById('opslider').offsetWidth;}tdiv6.sty
le.left=-thel;slidens6();}
function
slidens6(){if(parseInt(tdiv6.style.left)<=swidth){tdiv6.style.left=parseInt(
tdiv6.style.left)+sspeed;setTimeout("slidens6()",100);}else{tdiv6.style.left
=-thel;slidens6();}}
//----------------------------------------------

If someone can find out why please let me know.
Thnx !
 
J

Jonathan

marco said:
Hi !
I have this part of code and i can not find out why the scroller is starting
from left to right instead RIGHT to LEFT.
This is the main part and the scroller is working fine but from the wrong
side.


Can the same result (scrolling element) be accomplished in CSS?
Without seeing the code in action it's difficult to see exactly what
you're trying to achieve.
 
M

marco

Can the same result (scrolling element) be accomplished in CSS?
Without seeing the code in action it's difficult to see exactly what
you're trying to achieve.
*** I have ccs but just for colors and it has nothing to do with scroll. I
dont know if this can be done in ccs, but i think it can be done...

This is just like normal text/image scroller but from left to right. The
scroller repeat itself in endles loop.

O == simbol for image

----------------
O O O O O O
---------------
--->


Extended code:
//------------------------------------------------------------------
for(mi=leftimage.length-1;mi>=0;mi--)
imagef=imagef+leftimage[mi];

var
operbr=navigator.userAgent.toLowerCase().indexOf('opera');if(operbr==-1&&nav
igator.product&&navigator.product=="Gecko"){var agt =
navigator.userAgent.toLowerCase();var rvStart = agt.indexOf('rv:');var rvEnd
= agt.indexOf(')', rvStart);var check15 = agt.substring(rvStart+3,
rvEnd);if(parseFloat(check15)>=1.8)
operbr=0;}if(navigator.appVersion.indexOf("Mac")!=-1)operbr=0;

function goup(){if(sspeed!=rspeed*8){sspeed=sspeed*2;restart=sspeed;}}

function
start(){if(document.getElementById){tdiv6=document.getElementById('slider');
firstns6();}
else if(document.all){tdivie=slider;firstie();}else
if(document.layers){tdivns4=document.slider1.document.slider2;firstns4();}}
function
firstns4(){tdivns4.document.write('<nobr>'+imagef+'</nobr>');tdivns4.documen
t.close();thel=tdivns4.document.width;tdivns4.left=-thel;slidens4();}
function
slidens4(){if(tdivns4.left<=swidth){tdivns4.left+=sspeed;setTimeout("slidens
4()",100);}else{tdivns4.left=-thel;slidens4();}}
function
firstie(){tdivie.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdivie.offsetWid
th;tdivie.style.pixelLeft=-thel;slideie();}
function
slideie(){if(tdivie.style.pixelLeft<=swidth){tdivie.style.pixelLeft+=sspeed;
setTimeout("slideie()",100);}else{tdivie.style.pixelLeft=-thel;slideie();}}
function
firstns6(){tdiv6.innerHTML=('<nobr>'+imagef+'</nobr>');thel=tdiv6.offsetWidt
h;if(operbr!=-1){document.getElementById('opslider').innerHTML='<nobr>'+imag
ef+'</nobr>';thel=document.getElementById('opslider').offsetWidth;}tdiv6.sty
le.left=-thel;slidens6();}
function
slidens6(){if(parseInt(tdiv6.style.left)<=swidth){tdiv6.style.left=parseInt(
tdiv6.style.left)+sspeed;setTimeout("slidens6()",100);}else{tdiv6.style.left
=-thel;slidens6();}}
</SCRIPT>
 
R

Randy Webb

marco said the following on 6/16/2006 1:14 PM:
Can the same result (scrolling element) be accomplished in CSS?
Without seeing the code in action it's difficult to see exactly what
you're trying to achieve.
*** I have ccs but just for colors and it has nothing to do with scroll. I
dont know if this can be done in ccs, but i think it can be done...

This is just like normal text/image scroller but from left to right. The
scroller repeat itself in endles loop.

O == simbol for image

----------------
O O O O O O
---------------
--->


Extended code:
//------------------------------------------------------------------
for(mi=leftimage.length-1;mi>=0;mi--)
imagef=imagef+leftimage[mi];

var operbr=navigator.userAgent.toLowerCase().indexOf('opera');

That one line of code points to 99% of your problems.
 
M

marco

var operbr=navigator.userAgent.toLowerCase().indexOf('opera');
That one line of code points to 99% of your problems.
*** Hmmm.....
How can i fix this ? I want to use this scroller on firefox and on
iexplorer.
I have try the code with firefox and with iexplorer but direction is the
same : -->
So, basicly, i have no idea how to correct this....
 
J

Jonathan

marco said:
*** Hmmm.....
How can i fix this ? I want to use this scroller on firefox and on
iexplorer.
I have try the code with firefox and with iexplorer but direction is the
same : -->
So, basicly, i have no idea how to correct this....

I think purely from a programming point of view you need to dig deep
into firefox and iexplorer to find out what their instructions for such
an effect would be, but preferably see if there's a generic procedure
that works on all browsers. Go to their prospective development sites
and see what you can find - I don't know for iexplorer how much will be
available to the general public, but Mozilla should be completely open
about their functions etc. The best solution will be one that does not
rely on browser detection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top