Ver Mensaje Individual
  #7 (permalink)  
Antiguo 28/09/2009, 16:34
Avatar de kuriel
kuriel
 
Fecha de Ingreso: febrero-2009
Mensajes: 240
Antigüedad: 16 años
Puntos: 4
Respuesta: Ejecutar funcion despues de 2 segundos [OnMouseOver]

Como sea, pongo el codigo para los que buscaban algo similar:

Cita:
ENTRE ETIQUETAS <HEAD> Y </HEAD>
<script language="JavaScript1.4" type="text/javascript">
<!--
function jsPlay(soundobj) {
var thissound= eval("document."+soundobj);
try {
thissound.Play();
}
catch (e) {
thissound.DoPlay();
}
}

function jsStop(soundobj) {
var thissound= eval("document."+soundobj);
try {
thissound.Stop();
}
catch (e) {
thissound.DoStop();
}
}

function tesperas(nsegundos) {
objetivo = (new Date()).getTime() + 1000 * Math.abs(nsegundos);
while ( (new Date()).getTime() < objetivo );
};


//-->
</script>


ENTRE ETIQUETAS <BODY> Y </BODY>


<a onMouseOut="jsStop('nav1sound')" onMouseOver="tesperas(2);jsPlay('nav1sound')" href="#">PON EL PUNTERO AQUI PARA ESCUCHAR EL SONIDO, DE IGUAL MANERA, QUITALO PARA CALLAR EL SONIDO</a>
<embed name="nav1sound" src="URL/DE/TU/SONIDO.MP3" TYPE="application/x-mplayer2" autostart="false" mastersound hidden="true" volume=100 width=0 height=0>
</embed>
Lo de rosa es la funcion que hace que la siguiente funcion se retrase, "tesperas(AQUI NUMEROS PARA SEGUNDOS);", fin y gracias a mi solito XD
__________________
Si todas las URL's que tienes o visitas te parecen largas, visita www.korto.tk - También protege de rastros y con contraseñas tus páginas o URL's.

Última edición por kuriel; 28/09/2009 a las 17:11