Comunidad de diseño web y desarrollo en internet online

CUENTA ATRAS DE FECHA

Citar            
MensajeEscrito el 05 Sep 2006 06:04 am
COMO PUEDO HACER UNA CUENTA ATRAS DE UNA FECHA, POR EJEMPLO, FALTAN X DIAS PARA EL DIA X DE X DE 2007, PARA UNA PAGINA FLASH EN ACTION SCRIPT.

GRACIAS

Por ALFT1971

1 de clabLevel



 

msie
Citar            
MensajeEscrito el 06 Sep 2006 11:36 am
Creas 4 cajas de texto dinámico con los nombre de instancia de la parte inferior del script (para dias, horas, minutos y segundos) y en un clip vacío este script.

Date.prototype.countdown = function (obj, _onStatus, _onFinish)
{
var ms = 86400000;
var timer = setInterval(function (o)
{
var _l1 = new Date();
var _l2 = Math.floor((o.getTime() - _l1.getTime()) / ms);
var _l3 = Math.abs(_l1.getHours() - 23);
var _l5 = Math.abs(_l1.getMinutes() - 59);
var _l4 = Math.abs(_l1.getSeconds() - 60);
_onStatus.call(obj, _l2, _l3, _l5, _l4);
if (_l2 < 0)
{
_onFinish.call(obj);
clearInterval(timer);
} // end if
}, 1000, this);
};
ASSetPropFlag(Date.prototype, "countdown", 1);
var birthday = new Date(2006, 8, 12);
var myOnStatus = function (days, hours, minutes, seconds)
{
this.messageText1 = days;
this.messageText2 = hours;
this.messageText3 = minutes;
this.messageText4 = seconds;
};
birthday.countdown(this, myOnStatus, myOnFinish);

Por sirguy

52 de clabLevel



 

msie
Citar            
MensajeEscrito el 06 Sep 2006 11:47 am

Por Zah

BOFH

4290 de clabLevel

27 tutoriales
5 articulos

  Bastard Operators From Hell Editores

Zaragoza, España

firefox
Citar            
MensajeEscrito el 11 Sep 2006 05:03 am
por mas que intento e intento no me sale :shock: :oops: no se el codigo ba en el frame del clip basio? o en el clip?

Por lokemas

10 de clabLevel



Genero:Masculino  

msie

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.