Loop in a Class

what would be the best way to do this?

i am creating a class that handles false day/night time and i figure a loop would do best for it.

i know you can do an eventListener in as3, but what about as2?