Foros del Web » Programando para Internet » Javascript »

Scroll para texto

Estas en el tema de Scroll para texto en el foro de Javascript en Foros del Web. Hola gente Estoy terminando una pagina web, y tengo un pequeño problema tengo un script que me hace un scroll con dos imagenes, el problema ...
  #1 (permalink)  
Antiguo 08/12/2008, 06:59
 
Fecha de Ingreso: mayo-2006
Mensajes: 154
Antigüedad: 18 años
Puntos: 0
Scroll para texto

Hola gente
Estoy terminando una pagina web, y tengo un pequeño problema
tengo un script que me hace un scroll con dos imagenes, el problema que primero las dos flechas se cargan en un sitio antes de ponerse donde yo las tengo colocadas, y queda un poco feo, alguien me puede decir como evitar eso

La pagina es esta en cualquier enlace qe tenga texto salen las flechas

http://practicas.sumains.com

Y este es el codigo que utilizo para el scroll

Código PHP:
<div ID="botones">
                <
div id="staticbuttons" style="position:absolute;float:right;">
                <
a href="javascript:" onmouseover="myspeed=-thespeed" onmouseout="myspeed=0"><img src="imagenes/subir.png" border="0"></a><br>
                <
a href="javascript:" onmouseover="myspeed=thespeed" onmouseout="myspeed=0"><img src="imagenes/bajar.png" border="0"></a>
                </
div>
    <
script>

                
//Page Scroller (aka custom scrollbar)- By Dynamic Drive
                //For full source code and more DHTML scripts, visit [url]http://www.dynamicdrive.com[/url]
                //This credit MUST stay intact for use

                
var Hoffset=45 //Enter buttons' offset from right edge of window (adjust depending on images width)
                
var Voffset=80 //Enter buttons' offset from bottom edge of window (adjust depending on images height)
                
var thespeed=//Enter scroll speed in integer (Advised: 1-3)

                
var ieNOTopera=document.all&&navigator.userAgent.indexOf("Opera")==-1
                
var myspeed=0

                
var ieHoffset_extra=document.all15 0
                
var cross_obj=document.alldocument.all.staticbuttons document.getElementByIddocument.getElementById("staticbuttons") : document.staticbuttons

                
function iecompattest(){
                return (
document.compatMode && document.compatMode!="BackCompat")? document.documentElement document.body
                
}

                function 
positionit(){
                var 
dsocleft=document.alliecompattest().scrollLeft pageXOffset
                
var dsoctop=document.alliecompattest().scrollTop pageYOffset
                
var window_width=ieNOToperaiecompattest().clientWidth+ieHoffset_extra window.innerWidth+ieHoffset_extra
                
var window_height=ieNOToperaiecompattest().clientHeight window.innerHeight

                
if (document.all||document.getElementById){
                
cross_obj.style.left=parseInt(dsocleft)+parseInt(window_width)-Hoffset+"px"
                
cross_obj.style.top=dsoctop+parseInt(window_height)-Voffset+"px"
                
}
                else if (
document.layers){
                
cross_obj.left=dsocleft+window_width-Hoffset
                cross_obj
.top=dsoctop+window_height-Voffset
                
}
                }

                function 
scrollwindow(){
                
window.scrollBy(0,myspeed)
                }

                function 
initializeIT(){
                
positionit()
                if (
myspeed!=0){
                
scrollwindow()
                }
                }

                if (
document.all||document.getElementById||document.layers)
                
setInterval("initializeIT()",20/* "20" Velocidad de desplazamiento*/

                
</script>
                
    </div> 
Saludos
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:09.