CountDown Clock in flash using AS 3.0 - Flash Tutorials

VerkkoNetPublished: August 10, 2017
Published: August 10, 2017

This tutorial will help you to create a countdown clock. Hope you learn something new.

Website: http://samsolomonprabu.com/

Code:

var today:Date = new Date;
var christmas:Date = new Date(2013,11,25);

var milliseconds:Number = christmas.getTime() - today.getTime();
var seconds:Number = Math.floor(milliseconds / 1000);
var minutes:Number = Math.floor(seconds / 60);
var hours:Number = Math.floor(minutes / 60);
var days:Number = Math.floor(hours / 24);

hours %= 24;
minutes %= 60;
seconds %= 60;

countDown_txt.text = days + ":" + hours + ":" + minutes + ":" + seconds;

Recommend tags
  • action script programming+1
  • as3+1
  • adobe flash+1
  • flash tutorials+1

action script programmingas3adobe flashflash tutorials

Comments

0 comments