1
 lanzamiento de Flash . Haga clic en " Archivo" y seleccionar " Nuevo" en el menú contextual . Seleccione " Archivo de Flash ( ActionScript 3.0 )" y haga clic en " Aceptar". 
 
 2 Haga clic en la herramienta "Texto " en el panel Herramientas y arrastre en la pantalla para crear un cuadro de texto . Establecer el "Tipo de texto" del cuadro de texto para " Texto dinámico " desde el panel Propiedades. " . Timer_display " Establecer el " Nombre de instancia " para 
 
 3 Haga clic en el primer fotograma de la línea de tiempo y pulse ". F9 " Escriba el siguiente código en la ventana que se abre Acciones : 
 
 //register functionaddEventListener ( ' enterFrame ' , daytimer_handler ) ; 
 
 //llama repeatedlyfunction daytimer_handler ( evt : Event ) : void {//corriente datevar hoy : Date = new Date ( ) ;//Yearvar currentYear = today.getFullYear () ;//monthvar currentMonth = today.getMonth () ;//corriente dayvar currentDay = today.getDate () ;//corriente timevar horaActual = today.getTime ( ) Fecha ;//target corriente (5 días a partir de ahora cambian a su targetDate needvar : Date = new Date ( currentYear , currentMonth , currentDay 5 ) ; var targetDay = targetDate.getTime () ;//hora remainingvar timeLeft = targetDay - horaActual ; var s = Math.floor ( timeLeft/1000 ) ; var min = Math.floor ( sec/60 ) ; var hora = Math.floor ( min/60 ) ; var días = Math.floor ( horas/24 ) ; 
 
 //convertir sa stringsec = String ( sec 60 % ) ; 
 
 //si es inferior a añadir un ( sec.length < 2 ) 0 si {sec = " 0 " + s; } 
 
 min = String ( min 60 % ), si ( min.length < 2 ) { min = " 0 " + min ;} 
 horas 
 = String ( hora 24 % ) ; if ( hours.length < 2 ) { horas = " 0 " + horas ; } 
 días 
 = String ( días ) ; 
 
 si timeLeft ( > 0 ) { //display días stringvar dayCounter : String = días ; timer_display . text = dayCounter ;} else { trace (" ¡Feliz cumpleaños! "); Newtime var : String = " 0 " ; timer_display.text = Newtime ; removeEventListener ( ' enterFrame ' , daytimer_handler ) ;} 
 < p >} ; 
 
 
          
