Reloj digital en flash con date()
November 28th, 2006
Ayer ponia el codigo de como crear un reloj analógico en falsh. Pues hoy os pongo el código para hacerlo en digital. Algo más sencillo que el anterior.
Código:
- onEnterFrame = function () {
- hora = timedate.getHours();
- minutos = timedate.getMinutes();
- segundos = timedate.getSeconds();
- fechadehoy = timedate.getDate();
- dia = timedate.getDay();
- mes = timedate.getMonth();
- año = timedate.getFullYear();
- if (length(minutos) == 1) {
- minutos = “0″+minutos;
- }
- if (length(segundos) == 1) {
- segundos = “0″+segundos;
- }
- time = hora+”:”+minutos+”:”+segundos;
- date = fechadehoy+”/”+mes+”/”+año;
- delete timedate;
- timedate = new Date();
- };
Ejemplo:
This movie requires Flash Player 8
Entry Filed under: ActionScript
3 Comments Add your own
1. felipe | May 13th, 2007 at 17:58
como crear un reloj digita en flash pero con componentes porfa yudenme
2. Andy | July 18th, 2007 at 0:23
Un tutorial muy útil!
3. eje | January 31st, 2008 at 20:56
date=fechadehoy+”/”+(mes+1)+”/”+año;
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed