Primero create un texto dinamico llamado "fecha", luego en el frame donde tienes insertado el texto dinamico insertas este codigo:
Código :
onEnterFrame = function() {
objDate = new Date();
var dia=objDate.getDate();
var mes=objDate.getMonth()+1;
var año=objDate.getFullYear();
fecha.text="Hoy es "+dia+"/"+mes+"/"+año;}
y para un reloj pues pon este:
y debe funcionarte, pk es un CopyPaste de uno que hize.
Código :
onEnterFrame = function() {
objDate = new Date();
var dia=objDate.getDate();
var mes=objDate.getMonth()+1;
var año=objDate.getFullYear();
fecha.text="Hoy es "+dia+"/"+mes+"/"+año;
hora_text.text = objDate.getHours();
if(objDate.getHours()>12)
{
hora_text.text = objDate.getHours()-12;
if(objDate.getHours()==0)
{hora_text.text = objDate.getHours()+12;}
ampm.text="pm";}
else
{ampm.text="am";}
if(objDate.getHours()<10)
{hora_text.text="0"+hora_text.text}
minutos_text.text = objDate.getMinutes();
if(objDate.getMinutes()<10)
{minutos_text.text="0"+minutos_text.text;}
segundos_text.text = objDate.getSeconds();
if(objDate.getSeconds()<10)
{segundos_text.text="0"+segundos_text.text;}
};Recuerda crear los textos dinamicos que se necesitan.