Actionscript clock function problem
I have created a clock within flash but when I place it as an button selected object in a timeline it does not function, can anyone help me?
Thanks in anticipation!
You can view swf file here.
My actionscript is as follows:
time_btn.onRelease = function() {
gotoAndPlay("rolex_ani");
var hours = timenow.getHours();
var minutes = timenow.getMinutes();
var seconds = timenow.getSeconds();
var milliseconds = timenow.getMilliseconds();
var date:Number=timenow.getDate();
var day:String=days[timenow.getDay()];
var month:String=months[timenow.getMonth()];
var days:Array=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
var months:Array=["January", "February", "March", "April", "May", "June", "July", "August",
"September", "October", "November", "December"];
timenow = new Date();
day_txt.text =day;
date_txt.text =date;
month_txt.text=month;
hours_mc._rotation = (hours*30) + (minutes/2);
minutes_mc._rotation = (6 * minutes)+(0.1 * seconds);
seconds_mc._rotation = (0.006 * milliseconds)+(6 * seconds);
}
