Foros del Web » Programando para Internet » Javascript »

Problema en JS.

Estas en el tema de Problema en JS. en el foro de Javascript en Foros del Web. Hi! Espero que me sepan dar una solución a este problema... Tengo el siguiente script (scroll)... <style type="text/css"> #divNewsCont{position:absolute; width:350; height:150; overflow:hidden; top:260; left:140; clip:rect(0,350,150,0); ...
  #1 (permalink)  
Antiguo 22/05/2003, 09:41
AeSePe1
Invitado
 
Mensajes: n/a
Puntos:
Problema en JS.

Hi!
Espero que me sepan dar una solución a este problema...
Tengo el siguiente script (scroll)...

<style type="text/css">
#divNewsCont{position:absolute; width:350; height:150; overflow:hidden; top:260; left:140; clip:rect(0,350,150,0); visibility:hidden}
#divNewsText{position:absolute; top:0; left:0}
</style>

<script type="text/javascript" language="JavaScript">
Thomas Brattli
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()

lstart=100
loop=true
// Velocidad
speed=40
pr_step=1

function makeObj(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.el=bw.dom?document.getElementById(obj):bw.ie4 ?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
this.css=bw.dom?document.getElementById(obj).style :bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
this.scrollHeight=bw.ns4?this.css.document.height: this.el.offsetHeight
this.newsScroll=newsScroll;
this.moveIt=b_moveIt; this.x; this.y;
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}
function b_moveIt(x,y){
this.x=x;this.y=y
this.css.left=this.x
this.css.top=this.y
}
function newsScroll(speed){
if(this.y>-this.scrollHeight){
this.moveIt(0,this.y-pr_step)
setTimeout(this.obj+".newsScroll("+speed+")",speed )
}else if(loop) {
this.moveIt(0,lstart)
eval(this.obj+".newsScroll("+speed+")")
}
}
function newsScrollInit(){
oNewsCont=new makeObj('divNewsCont')
oNewsScroll=new makeObj('divNewsText','divNewsCont')
oNewsScroll.moveIt(0,lstart)
oNewsCont.css.visibility='visible'
oNewsScroll.newsScroll(speed)
}
onload=newsScrollInit;
</script>

Las demás líneas de código no son de gran importancia, en ellas solo se especifica el texto y los estilos...
Ahora bien.
Necesito que el texto, al llegar arriba de todo (alto: 430), el texto se pare, que NO siga girando....
A la par, cuando el texto se detenga, tengo que mostrar en el otro rincón de de la página, un botón de "entrar" que me dirige a otra web...
Espero que se pueda hacer un ingerto en el siguiente scirpt.

saludos y gracias de antemano!

Es muy dificil de hacerlo???
no me responde nadie :((.

Última edición por AeSePe1; 22/05/2003 a las 09:41
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 04:48.