Photo gallery modifications

That Photogallery is fantastic.

I was wondering if someone might be able to tell me how i would go about implementing it in a timebased manner, rather than waiting for a keypress on the users end.

i tried changing the keypress function to

this.onEnterframe= changePhoto (1)

but that only gives me one fade in fade out.

ideally, i’d love to set this up with a time variable i.e. each fadein/out lasts for 4 seconds.

and when it gets to the last image in the array, it just loops back.

could someone provide me with some guidance?

thanks