AS3 can I use getSeconds to play a movie clip every minute

Hi, I’m currently making a ‘screensaver’ using Flash CC and AS3 that uses getHours, getMinutes, getSeconds etc to create a digital clock in a dynamic text box. I have a movie clip in my library that i’d like to appear on the stage and play every minute but by that I mean specifically every time getSeconds gets to ‘00’ rather than just every 60 seconds from when the animation starts. Is there any way I can do this?

You’ll have to poll for it; there’s no event that will let you know when that happens. You can do this in enterFrame if you want, but you have to be careful because there will be multiple frames where it will report 0, so you’ll probably want to either keep a previous value to compare it with (if prev = 59 and current = 0 then …; prev = current;) or remove the event listener and throw it back on after a 50 second delay or something.