Foros del Web » Programando para Internet » Javascript »

Ayuda con este Script

Estas en el tema de Ayuda con este Script en el foro de Javascript en Foros del Web. Este es el script que puedes seleccionar, copiar y pegar directamente. Esta parte hay que pegarla entre las etiquetas body, donde se quiera que aparezca ...
  #1 (permalink)  
Antiguo 04/06/2002, 05:41
 
Fecha de Ingreso: mayo-2002
Mensajes: 96
Antigüedad: 22 años
Puntos: 0
Ayuda con este Script

Este es el script que puedes seleccionar, copiar y pegar directamente.
Esta parte hay que pegarla entre las etiquetas body, donde se quiera que aparezca el efecto:

<p id='anima' style="position:center;font-size:20;background-color:red;">
</font>
</p>
<br>
<br>

<SCRIPT LANGUAGE="JavaScript">

<!-- Este script y otros muchos los puedes encntrar en -->
<!-- Mundo Javascript http://www.precios10.com/mundojavascritp -->

<!-- Begin
text = "Añade.este.script.a.tu.web!..Puedes.simular. core/4rregir.el texto.que.informa.al.visitante!.."
word = text.split('.')
i = -1; //letter count
j = 0; //which word in array is to be spelled
start = 0; //variable to hold cycles of the blink
scount = 0; //variable to hold cycles of the mispell
function checkIt() {
with(document.all.anima) {
if(innerText.charAt(innerText.length-1) == "_") {
innerText = innerText.substring(0, innerText.length - 1);
return true;
}
else {
innerText = innerText + "_";
return false;
}
}
}
function blinkfor(count, timing) {
with(document.all.anima) {
if(start < count) {
if(checkIt()) {
start++;
}
mistake = 'blinkfor('+count+','+timing+')';
setTimeout('eval(mistake)', timing);
}
else {
start = 0;
i++;
call_It();
}
}
}
function mispell(offset,correction) {
with(document.all.anima) {
if(scount < offset) {
if(!checkIt()) {
innerText = innerText.substring(0, innerText.length-2) + "_";
scount++;
}
mistake = 'mispell(' + offset + ', "' + correction + '")';
setTimeout("eval(mistake)", 150);
}
else {
if(correction == '' && scount == offset ) {
i = i - offset;
scount++;
}
if(offset > 0) {
if(checkIt()) {
innerText += correction.charAt(correction.length - offset) + "_";
offset--;
}
mistake = 'mispell(' + offset + ',"' + correction + '")';
setTimeout("eval(mistake)", 150);
}
else {
scount = 0;
j++;
innerText = innerText.substring(0, innerText.length - 1);
call_It();
}
}
}
}
function spellit(string) {
with(document.all.anima) {
if(i <= string.length) {
if(string.charAt(i) == '/') {
NumErrs = string.charAt(i + 1);
NewLets = string.substring(i + 2, i + NumErrs);
mispell(NumErrs,NewLets);
}
else if(i <= string.length - 1) {
i++;
innerText = string.substring(0,i) + "_";
mistake = 'spellit("' + string + '")';
setTimeout("eval(mistake)", 150);
}
else {
innerText = string.substring(0, i);
j++;
call_It();
}
}
}
}
function call_It() {
with(document.all) {
if(i == -1){
blinkfor(4, 150);
}
else if(j <= word.length - 1) {
spellit(anima.innerText + " " + word[j]);
}
else {
blinkfor(100,230);
}
}
}
if(document.all) {
call_It();
}
// End -->
</script>
  #2 (permalink)  
Antiguo 04/06/2002, 05:43
 
Fecha de Ingreso: mayo-2002
Mensajes: 96
Antigüedad: 22 años
Puntos: 0
Re: Ayuda con este Script

alguien me puede decir que parametros debo de cambiar, para que las letras se vean verdes??? Ya sé como se cambia el fondo, en este caso esta en color rojo; pero eske no sé como se cambia el color de las letras!!! :(
  #3 (permalink)  
Antiguo 04/06/2002, 09:41
bet
 
Fecha de Ingreso: febrero-2001
Mensajes: 292
Antigüedad: 23 años, 2 meses
Puntos: 0
Re: Ayuda con este Script

Tenés que cambiar la primera línea de la siguiente manera:

<p id='anima' style="position:center;font-size:20;background-color:red;color:green;">


<hr noshade size=1><img src="http://www.gograph.com/Images-8712/ClipArt/cat03.gif" height="50" border=0 align="absmiddle"> <font size="2" face="verdana" color="#000000">bet[/CODE]
  #4 (permalink)  
Antiguo 04/06/2002, 11:57
Avatar de .
.
 
Fecha de Ingreso: mayo-2002
Ubicación: Tampico
Mensajes: 906
Antigüedad: 22 años
Puntos: 1
Re: Ayuda con este Script

Más bien parecía problema de estilo, no de javascript
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 20:28.