# How can i add timing to this code?

**URL:** <https://forum.kirupa.com/t/how-can-i-add-timing-to-this-code/213960>\
**Category:** flash\
**Created:** [January 24, 2007, 4:33pm UTC](https://forum.kirupa.com/t/how-can-i-add-timing-to-this-code/213960 "2007-01-24T16:33:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abus](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/abus/32/930_2.png) [@Abus](https://forum.kirupa.com/u/Abus)\
**Post date:** [January 24, 2007, 4:33pm UTC](https://forum.kirupa.com/t/how-can-i-add-timing-to-this-code/213960/1 "2007-01-24T16:33:44Z")

</div>

Hi,

In the tutorial named “How to load random movies” it loads random movies when the page refreshes. I want to modify the code to load random movies 5 seconds at a time.

This is the code from the tutorial, how can i add the property I wanted.

```auto

[COLOR=#000050]filename[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000ff][[/COLOR][COLOR=#666666]"circular.swf"[/COLOR], [COLOR=#666666]"vibration.swf"[/COLOR], [COLOR=#666666]"random_movement.swf"[/COLOR][COLOR=#0000ff]][/COLOR]; [COLOR=#000050]path[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#666666]"http://www.kirupa.com/developer/actionscript/animation/"[/COLOR]; [COLOR=#000050]i[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#000050]filename[/COLOR].[COLOR=#0000d0]length[/COLOR]; [COLOR=#000050]k[/COLOR] [COLOR=#0000ff]=[/COLOR] [COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]floor[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#0000d0]Math[/COLOR].[COLOR=#0000d0]random[/COLOR][COLOR=#0000ff]()*[/COLOR][COLOR=#000050]i[/COLOR][COLOR=#0000ff])[/COLOR]; [COLOR=#0000d0]loadMovie[/COLOR][COLOR=#0000ff]([/COLOR][COLOR=#000050]path[/COLOR][COLOR=#0000ff]+[/COLOR][COLOR=#000050]filename[/COLOR][COLOR=#0000ff][[/COLOR][COLOR=#000050]k[/COLOR][COLOR=#0000ff]][/COLOR], [COLOR=#000050]movieTarget[/COLOR][COLOR=#0000ff])[/COLOR]; 

```

Any help will be great.
