JavaScript - Scroll up (applet java para noticias)

 
Vista:

Scroll up (applet java para noticias)

Publicado por Pulpo (1 intervención) el 23/10/2002 19:52:53
Alguien sabe como se hacen esos applets java en los cuales se puede poner un texto y corre como si fuese una marquesina de abajo hacia arriba ??? hay un ejemplo en la pagina www.supergol.com.ar
??????????
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Scroll up (applet java para noticias)

Publicado por cabralesweb (8 intervenciones) el 24/10/2002 02:45:43
Yo conozco dos maneras de hacer lo que quieres: Una es poer un código javascript y hacer que toda la página haga scroll (interesante si la abres en un popup. Otra manera es con otro código javascript que tú configuras con código html y pones el texto que quieras que haga scroll donde tú quieras que salga en la página. Para esta última forma este es el código; pruébalo (creo que se ajusta más a lo que buscas) pero si quieres el otro me lo pides. Saludos<script language="JavaScript1.2">
// ancho
var marqueewidth=300
// alto
var marqueeheight=50
// velocidad
var speed=1
// contenido
var marqueecontents='AQUÍ EL CÓDIGO HTML QUE QUIERAS<BR>Aquí pones el texto que quieras qu aparezca.'

if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
set
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:Scroll up (applet java para noticias)

Publicado por cabralesweb (8 intervenciones) el 24/10/2002 02:59:48
<script language="JavaScript1.2">
// ancho
var marqueewidth=300
// alto
var marqueeheight=50
// velocidad
var speed=1
// contenido
var marqueecontents='AQUÍ EL CÓDIGO HTML QUE QUIERAS<BR>Aquí el texto que quieras haga scroll.'

if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')

function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}

window.onload=regenerate2
</script>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar