# Scripting : Open a random file

**URL:** <https://forum.kirupa.com/t/scripting-open-a-random-file/121994>\
**Category:** Uncategorized\
**Created:** [September 9, 2004, 11:42am UTC](https://forum.kirupa.com/t/scripting-open-a-random-file/121994 "2004-09-09T11:42:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RayDream](https://avatars.discourse-cdn.com/v4/letter/r/dbc845/32.png) [@RayDream](https://forum.kirupa.com/u/RayDream)\
**Post date:** [September 9, 2004, 11:42am UTC](https://forum.kirupa.com/t/scripting-open-a-random-file/121994/1 "2004-09-09T11:42:36Z")

</div>

Hi,

I’m kind of a newbie to scripting… I’m intending to use flash to serve as a navigation menu on my website to open a random file to a specific frame.

on (press) {  
getURL(“test1.htm”, “mainFrame”);  
}

However, how can I make it in such a way that it will randomly pick “test1.htm”, “test2.htm” or “test3.htm”?

Thank you!  
(The last time I was here was last year to ask some flash question, thanks to Eilsoe who solved my problem!)
