Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/03/2009, 06:58
Avatar de johnnygomez
johnnygomez
 
Fecha de Ingreso: octubre-2007
Mensajes: 166
Antigüedad: 17 años, 5 meses
Puntos: 0
No me muestra bien la función

Hola, tengo un problema el cual no se que puede ser... tengo la siguiente funcion:


<head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function opacity(id, opacStart, opacEnd, millisec) {
//speed for each frame
var speed = Math.round(millisec / 100);
var timer = 0;

//determine the direction for the blending, if start and end are the same nothing happens
if(opacStart > opacEnd) {
for(i = opacStart; i >= opacEnd; i--) {
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
} else if(opacStart < opacEnd) {
for(i = opacStart; i <= opacEnd; i++)
{
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
}
}


y continua... pero al ejecutar la pagina no me funcionaba la funcion... miro el codigo fuente y me encuentro con esto:

<head>

<SCRIPT LANGUAGE="JavaScript">
opacEnd) {
for(i = opacStart; i >= opacEnd; i--) {
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
} else if(opacStart < opacEnd) {
for(i = opacStart; i <= opacEnd; i++)
{
setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
timer++;
}
}
}


tengo algunas funciones mas debajo de esta, pero siempre es como que me omite entre "javaScript"> y "opacEnd" si tengo mas funciones, no me muestra ninguna de las otras... a que se debe esto?