OK, Some important thing On your stage you have to prepare: MovieClip (clockface) and inside: secondhand, minutehand and hourhand MovieClips as well You need text frame (Dynamic text Field) with instance name timeDisplay You prepared some mistakes (duplicate variables, and no variable definitione) then use this code import flash.utils.Timer; import flash.display.MovieClip; import flash.text.TextField; import flash.events.MouseEvent; import flash.events.TimerEvent; import flash.text.TextFieldType; var clockface:MovieClip; var timedisplay:TextField; var ticker:Timer = new Timer(250); var currentTime // variable declaration ticker.addEventListener(TimerEvent.TIMER, onTick); ticker.start(); function onTick(e:TimerEvent):void { currentTime = new Date(); var seconds:uint = currentTime.getSeconds(); var minutes:uint = currentTime.getMinutes(); var hours:uint = currentTime.getHours(); clockface.secondhand.rotation = 360 + (seconds * 6); // remember MovieClips here clockface.minutehand.rotation = 360 + (minutes * 6); clockface.hourhand.rotation = 360 + (hours * 30) + (minutes * 0.5); var displayMinutes:String = minutes < 10 ? "0" + minutes : "" + minutes; timeDisplay.text = hours + ":" + displayMinutes; // text Field here }
... View more