Ver Mensaje Individual
  #2 (permalink)  
Antiguo 19/10/2005, 12:39
Avatar de Bandit
Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 9 meses
Puntos: 406
Hola muttertag:
Bienvenido al Foro.
Crea un MC y en el primer frame coloca un campo de texto dinámico con nombre de instancia: data y le aumentas un fotograma simple hasta en el frame 2.
Crea la capa 2 y en el primer frame coloca éste código:
currentDate = new Date();
thisYear = currentDate.getFullYear();
thisMonth = currentDate.getMonth();
nextDay = currentDate.getDate()+1;
eventDate = new Date(thisYear, thisMonth, nextDay);
eventMillisecs = eventDate.getTime();
currentDate = new Date();
currentMillisecs = currentDate.getTime();
msecs = eventMillisecs-currentMillisecs;
if (msecs<0) {
msecs = 0;
}
secs = Math.floor(msecs/1000);
mins = Math.floor(secs/60);
hours = Math.floor(mins/60);
days = Math.floor(hours/24);
msecs = String(Math.floor(msecs%1000/10));
secs = String(secs%60);
mins = String(mins%60);
hours = String(hours%24);
days = String(days);
if (msecs.length<2) {
msecs = "0"+msecs;
}
if (secs.length<2) {
secs = "0"+secs;
}
if (mins.length<2) {
mins = "0"+mins;
}
if (hours.length<2) {
hours = "0"+hours;
}
while (days.length<3) {
days = "0"+days;
}
data.text = days+":"+hours+":"+mins+":"+secs+":"+msecs;
updateAfterEvent();
En la capa 2 frame 2 coloca: gotoAndPlay(1);
Este MC lo pones en el escenario en el lugar donde quieres que se vea.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/