You could use something like:
floor(random(1,4) to generate a number that would relate to your world.
For example, If you called your worlds:
world1
world2
world3
world4
You could do this to capture the name of the world:
"world" & floor(random(1,4))
The result would be something like world1, world2, world3, world4. You can then concatenate that to a URL like this:
http://localhost/" & object.property
If you were to stuff the value in a text box, you could do something like this using the Browser object:
Go to "http://localhost" & Text.Text in a new window("NewWindow")
The result of the above would be something like this:
localhost/world2
Just make sure you have a corresponding directory on your server. In this case, a directory called world2 with the index file in there.
You would need a way to fire that event, for example a button. It cold be anything. Even a portal or something.
In terms of storing the variables, you could use an Array object.