SCROLL DE BIENVENIDA CON EFECTOS PARA BLOGGER


SCROLL DE BIENVENIDA CON EFECTOS PARA BLOGGER
"BLOGS KIRADOBER"



Gustosamente he visto que varios lectores usaron en su blog el scroll de bienvenida, sin embargo para los que les gustan los scrolls más sofisticados les traigo este scroll de bienvenida que con numerosos efectos como letras que se desplazan a la izquiera, a la derecha, letras que salen expulsadas, letras que se contraen, texto que se separa, etc. Para que sepan de lo que hablo pueden ver el scroll funcionando abajo de la cabecera en este blog de pruebas.

Para ponerlo en tu blog entra a Diseño | Añadir un gadget, selecciona HTML/Javascript y ahí pega el código siguiente:

 Para implementarlo en vuestro Bloc en un gadget solo tenéis que seguir estos pasos:

 Un clic en “Diseño”



Clic en “Añadir un gadget”



Busca el widget que dice “HTML-Javascript” y ábrelo



Coloca el siguiente código en el interior





<script>
function createArr(num) { for(var i = 0; i < num; i++) { this[i] = null } }
function fillArr(tx,me,ti,wa) { this.text = tx; this.method = me.toLowerCase(); this.ticks = ti; this.wait = wa }
function block(num,txt,mthod,tcks,wit) { blocks[num] = new fillArr(txt,mthod,tcks,wit) }
function ms(unt) { var sp = ""; for( var i = 1; i <= unt; i++ ) { sp += " " } return(sp) }
function Activate() { if (cblock == max) { cblock = 0; if (iloop == 0) { loops--; if (loops == 0) { meth = "0" } else { meth = blocks[cblock].method } } else { meth = blocks[cblock].method } } else { meth = blocks[cblock].method }
if (meth == "0") { document.Active.ASCII.value = end }
if (meth == "display") { Tape = blocks[cblock].text; Wait = blocks[cblock].wait; Display() }
if (meth == "display center") { Tape = blocks[cblock].text; Wait = blocks[cblock].wait; half = Tape.length / 2; DisplayC() }
if (meth == "scroll left") { clen = tlen; Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; tTicks = Ticks * 2; ScrollL() }
if (meth == "scroll right") { clen = 0 - blocks[cblock].text.length; Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; tTicks = Ticks * 2; ScrollR() }
if (meth == "scroll lc") { clen = 0 - blocks[cblock].text.length; Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; Wait = blocks[cblock].wait; tTicks = Ticks * 2; half = Tape.length / 2; ScrollLC() }
if (meth == "scroll rc") { clen = tlen; Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; Wait = blocks[cblock].wait; tTicks = Ticks * 2; half = Tape.length / 2; ScrollRC() }
if (meth == "scroll cl") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; tTicks = Ticks * 2; half = Tape.length / 2; clen = cent - half; ScrollCL() }
if (meth == "scroll cr") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; tTicks = Ticks * 2; half = Tape.length / 2; clen = cent - half; ScrollCR() }
if (meth == "slide left") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; Wait = blocks[cblock].wait; cpos = 0; clet = Tape.charAt(cpos); clen = tlen; cstr = ""; SlideL() }
if (meth == "slide lc") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; Wait = blocks[cblock].wait; cpos = Tape.length - 1; clet = Tape.charAt(cpos); clen = 0; cstr = ""; half = Tape.length / 2; iba = cent - half; ib = ms(iba); SlideLC() }
if (meth == "slide rc") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; Wait = blocks[cblock].wait; cpos = 0; clet = Tape.charAt(cpos); cstr = ""; half = Tape.length / 2; clen = cent + half; fs = ms(cent - half); SlideRC() }
if (meth == "slide cl") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; cpos = 0; clet = Tape.charAt(cpos); cstr = Tape.substring(1,Tape.length); half = Tape.length / 2; clen = cent - half; iba = 0; ib = ms(iba); SlideCL() }
if (meth == "slide cr") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; cpos = Tape.length - 1; clet = Tape.charAt(cpos); cstr = Tape.substring(0,Tape.length - 1); half = Tape.length / 2; clen = 0; fs = ms(cent - half); SlideCR() }
if (meth == "slip left") { clen = 0; Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; SlipL() }
if (meth == "slip right") { clen = 0; Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; SlipR() }
if (meth == "slip letter") { Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; cpos = Tape.length - 1; clet = Tape.charAt(cpos); cstr = Tape.substring(0,Tape.length - 1); clen = 0; SlipLet() }
if (meth == "split"){ Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; var iii = Tape.length / 2; if (iii / 2 != Math.ceil(iii / 2)) { Tape = Tape + " " } hstr1 = Tape.substring(0,Tape.length/2); hstr2 = Tape.substring(Tape.length/2,Tape.length); tTicks = Ticks * 2; clen = cent - hstr1.length; iba = 0; ib = ms(iba); Split() }
if (meth == "merge"){ Tape = blocks[cblock].text; Ticks = blocks[cblock].ticks; var iii = Tape.length / 2; if (iii / 2 != Math.ceil(iii / 2)) { Tape = Tape + " " } hstr1 = Tape.substring(0,Tape.length/2); hstr2 = Tape.substring(Tape.length/2,Tape.length); tTicks = Ticks * 2; clen = 0 - hstr1.length; iba = tlen; ib = ms(iba); Wait = blocks[cblock].wait; Merge() } }
function Display() { document.Active.ASCII.value = Tape; cblock++; timerID = setTimeout("Activate()",Wait) }
function DisplayC() { var temp = cent - half; ini = ms(temp); document.Active.ASCII.value = ini + Tape; cblock++; timerID = setTimeout("Activate()",Wait) }
function ScrollL() { if (clen >= 0) { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("ScrollL()",Ticks) } else { beg = 0 - clen; if (beg == Tape.length) { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Ticks) } else { tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("ScrollL()",tTicks) } } }
function ScrollR() { if (clen >= 0) { if (clen > tlen) { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Ticks) } else { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("ScrollR()",Ticks) } } else { beg = 0 - clen; tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("ScrollR()",tTicks) } }
function ScrollLC() { if (clen >= 0) { if (cent <= (clen + half)) { cblock++; timerID = setTimeout("Activate()",Wait) } else { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("ScrollLC()",Ticks) } } else { beg = 0 - clen; if (cent <= (clen + half)) { cblock++; timerID = setTimeout("Activate()",Wait) } else { tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("ScrollLC()",tTicks) } } }
function ScrollRC() { if (clen >= 0) { if (cent >= (clen + half)) { cblock++; timerID = setTimeout("Activate()",Wait) } else { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("ScrollRC()",Ticks) } } else { beg = 0 - clen; if (cent >= (clen + half)) { cblock++; timerID = setTimeout("Activate()",Wait) } tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("ScrollRC()",tTicks) } }
function ScrollCL() { if (clen >= 0) { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("ScrollCL()",Ticks) } else { beg = 0 - clen; if (beg >= Tape.length) { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Wait) } else { tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("ScrollCL()",tTicks) } } }
function ScrollCR() { if (clen >= 0) { if (clen > tlen) { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Wait) } else { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("ScrollCR()",Ticks) } } else { beg = 0 - clen; tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("ScrollCR()",tTicks) } }
function SlideL() { if (clen >= 0) { ini = ms(clen); tickered = cstr + ini + clet; document.Active.ASCII.value = tickered; clen -= 3; timerID = setTimeout("SlideL()",Ticks) } else { document.Active.ASCII.value = cstr + clet; cstr = document.Active.ASCII.value; clen = tlen - cstr.length; cpos++; clet = Tape.charAt(cpos); if (clet == " ") { cstr = cstr + " "; cpos++; clet = Tape.charAt(cpos) } if (clet == "") { cblock++; timerID = setTimeout("Activate()",Wait) } else { timerID = setTimeout("SlideL()",Ticks) } } }
function SlideLC() { if (clen <= cent - half) { ini = ms(clen); tickered = ini + clet + ib + cstr; document.Active.ASCII.value = tickered; clen += 3; iba -= 3; ib = ms(iba); timerID = setTimeout("SlideLC()",Ticks) } else { iba = cent - half; ini = ms(iba); ib = ms(iba); document.Active.ASCII.value = ini + clet + cstr; cstr = clet + cstr; clen = 0; cpos--; if (cpos >= 0) { clet = Tape.charAt(cpos); if (clet == " ") { cstr = " " + cstr; cpos--; clet = Tape.charAt(cpos) } timerID = setTimeout("SlideLC()",Ticks) } else { cblock++; timerID = setTimeout("Activate()",Wait) } } }
function SlideRC() { if (clen >= 0) { ini = ms(clen); tickered = fs + cstr + ini + clet; document.Active.ASCII.value = tickered; clen -= 3; timerID = setTimeout("SlideRC()",Ticks) } else { clen = cent + half; cstr += clet; document.Active.ASCII.value = fs + cstr; cpos++; clet = Tape.charAt(cpos); if (clet == " ") { cstr = cstr + " "; cpos++; clet = Tape.charAt(cpos) } if (clet == "") { document.Active.ASCII.value = fs + Tape; cblock++; timerID = setTimeout("Activate()",Wait) } else { timerID = setTimeout("SlideRC()",Ticks) } } }
function SlideCL() { if (clen > 0) { ini = ms(clen); tickered = ini + clet + ib + cstr; document.Active.ASCII.value = tickered; clen -= 3; iba += 3; ib = ms(iba); timerID = setTimeout("SlideCL()",Ticks) } else { iba = 0; ib = ms(iba); clen = cent - half; ini = ms(clen); document.Active.ASCII.value = ini + cstr; cstr = cstr.substring(1,Tape.length); cpos++; clet = Tape.charAt(cpos); if (clet == " ") { cstr = cstr.substring(1,Tape.length); cpos++; clet = Tape.charAt(cpos) } if (clet == "") { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Ticks) } else { timerID = setTimeout("SlideCL()",Ticks) } } }
function SlideCR() { if (clen <= cent + half) { ini = ms(clen); tickered = fs + cstr + ini + clet; document.Active.ASCII.value = tickered; clen += 3; timerID = setTimeout("SlideCR()",Ticks) } else { clen = 0; document.Active.ASCII.value = fs + cstr; cstr = cstr.substring(0,cstr.length - 1); cpos--; half += 1; if (cpos >= 0) { ; clet = Tape.charAt(cpos); if (clet == " ") { cstr = cstr.substring(0,cstr.length - 1); cpos--; clet = Tape.charAt(cpos) } timerID = setTimeout("SlideCR()",Ticks) } else { cblock++; timerID = setTimeout("Activate()",Ticks) } } }
function SlipR() { if (clen >= 0) { if (clen > tlen) { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Ticks) } else { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("SlipR()",Ticks) } } else { beg = 0 - clen; tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen++; timerID = setTimeout("SlipR()",Ticks) } }
function SlipL() { if (clen >= 0) { ini = ms(clen); tickered = ini + Tape; document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("SlipL()",Ticks) } else { beg = 0 - clen; if (beg == Tape.length) { document.Active.ASCII.value = ""; cblock++; timerID = setTimeout("Activate()",Ticks) } else { tickered = Tape.substring(beg,tlen); document.Active.ASCII.value = tickered; clen--; timerID = setTimeout("SlipL()",Ticks) } } }
function SlipLet() { if (clen < tlen) { ini = ms(clen); tickered = cstr + ini + clet; document.Active.ASCII.value = tickered; clen += 3; timerID = setTimeout("SlipLet()",Ticks) } else { clen = 0; cstr = cstr.substring(0,cstr.length - 1); cpos--; if (cpos >= 0) { ; clet = Tape.charAt(cpos); if (clet == " ") { cstr = cstr.substring(0,cstr.length - 1); cpos--; clet = Tape.charAt(cpos) } timerID = setTimeout("SlipLet()",Ticks) } else { cblock++; timerID = setTimeout("Activate()",Ticks) } } }
function Split() { if (clen >= 0) { ini = ms(clen); tickered = ini + hstr1 + ib + hstr2; document.Active.ASCII.value = tickered; clen--; iba += 2; ib = ms(iba); timerID = setTimeout("Split()",Ticks) } else { if (clen <= 0 - hstr1.length) { cblock++; timerID = setTimeout("Activate()",Ticks) } else { beg = 0 - clen; tickered = hstr1.substring(beg,tlen); document.Active.ASCII.value = tickered + ib + hstr2; clen--; iba += 2; ib = ms(iba); timerID = setTimeout("Split()",tTicks) } } }
function Merge() { if (clen >= 0) { if (clen > cent - hstr1.length) { tickered = ini + hstr1 + hstr2; document.Active.ASCII.value = tickered; cblock++; timerID = setTimeout("Activate()",Wait) } else { ini = ms(clen); tickered = ini + hstr1 + ib + hstr2; document.Active.ASCII.value = tickered; clen++; iba -= 2; ib = ms(iba); timerID = setTimeout("Merge()",Ticks) } } else { beg = 0 - clen; tickered = hstr1.substring(beg,tlen); document.Active.ASCII.value = tickered + ib + hstr2; clen++; iba -= 4; ib = ms(iba); timerID = setTimeout("Merge()",tTicks) } }

/////////////////////////////////////////////////////////////////
//# Personalización
// Número de bloques que se mostrarán.
// ***ERROR COMÚN***: Asegúrate de establecer este valor de acuerdo al
// número de bloques (Siempre cuenta el último bloque y suma uno más # + 1)!
var max = 15

// No tocar esto!
var blocks = new createArr(max)

// Ancho de la caja de texto
// ***ERROR COMÚN: Si cambias esto
// recuerda cambiar también el número que está al final subrayado.***
var len = 35

// Número de veces que se repetirá el bloque (use 0 para infinito)
var loops = 0

// Si cambias lo anterior modifica también el mensaje final
var end = 'End of "ActiveASCII" by Neal Kanodia.'

// Usa este formato por cada cadena de texto (empezando de 0 hasta 1 a menos
// que max):
// block(#block,"Text to display","Method",#ticks,#wait)
// ejemplo: block(0,"1st block.","Scroll Left",25,0)
// ***ERROR COMÚN***: Si agregas un nuevo bloque INCREMENTA MAX BY 1
// ***ERROR COMÚN***: Si eliminas un bloque REDÚCELO A MAX BY 1
// ***ERROR COMÚN***: Revisa bien los textos que agregas y los efectos!!!
block(0,"Este es un ejemplo de una marquesina","scroll left",20,0)
block(1,"Con varios efectos","scroll right",20,0)
block(2,"Puedes usarlo para dar la bienvenida","scroll lc",20,500)
block(3,"Anunciar algo","scroll rc",20,500)
block(4,"O para lo que quieras","scroll cl",20,0)
block(5,"Te gusta este efecto?","split",25,0)
block(6,"O este?","slide left",10,500)
block(7,"qué tal este?","slide lc",20,500)
block(8,"Lindo, no?","slide rc",15,500)
block(9,"Puedes tenerlo","slide cr",10,1000)
block(10," Consigue el código para usarlo tú tambien ","slip left",60,1000)
block(11,"En...Blogs Kiradober ","slip right",70,1000)
block(12,"Trucos ...","slip letter",5,0)
block(13,"Y tutoriales","merge",25,1000)
block(14,"Para tu blog","split",25,0)
//Fin de personalización
/////////////////////////////////////////////////////////////////

// No cambiar!!!
var tlen = 2.4 * len
var cent = tlen / 2.2
var clen = null
var tickered = null
var ini = null
var iloop = 0
if (loops == 0) {iloop = 1}
var cblock = 0
var timerID = null
var beg = null
var clet = null
var cstr = null
var cpos = null
var ib = null
var iba = null
var fs = null
var hstr1 = null
var hstr2 = null
<!-- end -->
</script>

<script>
document.write('<form name="Active" onsubmit="0">')
document.write('<input name="ASCII" size="35" type="text">')
document.write('</form>')
Activate()
</script>

Cambia los textos en color rojo por los tuyos.

Si deseas cambiar el largo de la caja debes cambiarlo dos veces donde se marca subrayado en negrita.

Si eliminas o agregas más líneas modifica donde dice: var max = 15

Lo que está en color verde son los efectos, puedes usar los que quieras, a continuación te diré cuál es cada uno:
"scroll left",20,0 Marquesina a la izquierda.
"scroll right",20,0 Marquesina a la derecha.
"scroll lc",20,500 Marquesina a la izquierda que se corta.
"scroll rc",20,500 Marquesina a la derecha que se corta.
"scroll cl",20,0 Marquesina a la izquierda que empieza centrada.
"split",25,0 Texto que se divide en dos partes.
"slide left",10,500 Las letras se juntan para formar la palabra.
"slide lc",20,500 Las letras se juntan y se va moviendo el texto desde la izquierda.
"slide rc",15,500 Las letras se juntan y se va moviendo el texto desde la derecha.
"slip letter",5,0 Las letras son expulsadas.
"merge",25,1000 La frase se junta.

En el código he traducido las indicaciones para que te guíes más fácil al personalizarlo.


Después de haber insertado el código, un clic en "Guardar"




Data de la Publicación; 06-10-2019

 Fuente; ciudadblogger

 Publicado por;                                                                     






No hay comentarios:

Publicar un comentario

featured Slider

Adbox