Jump to content

The clock hand is not rotating action script 3

levsingh


import flash.events.Event;

var time:Date = new Date(); var sec:int = time.seconds;

hour_mc.addEventListener(Event.ENTER_FRAME,Rot);

function Rot(e:Event):void {

hour_mc.rotation = sec*6;

}

i want to make a clock with event listener in action script 3 and when i run this movie it just shows the current second and doesn't move what am i doing wrong here?

Link to comment
Share on other sites

Link to post
Share on other sites

Is sec ever being updated anywhere?

yeah when i run it shows the sec but doesn't run

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×