Equal random values in multiple projects

I had an idea for a website where every time you visit it there’s a different backdrop, logo, colour scheme, general theme, etc. chosen at random. And then, to add to that, I’d later add completely new designs for the site that would be chosen at random when you visit the site, each design having different colour schemes, logos, themes, etc.

But I’ve reached a blockade pretty **** quickly.

The thing is that the first design, at least, is going to combine Flash with HTML, most notably in the sense that it will consist of 3 frames.

That, unfortuantely, means at least 3 different things have to be receiving the same random numbers - 2 flash files and one HTML.

Anybody have any ideas as to how I could do this?

So far the best idea I’ve come up with is outputting a random number to a file then having the 3 frames pull the number out of the file. The problem there, though, is that if you visit the site and then while its loading somebody else visits it the colour scheme will get mixed up, won’t it?

Any suggestions? Corrections of a possibly incorrect theory?

Instead of having 2 random values can you go like this…

value1 = Math.random()*8
value2 = value1

I am not sure how you are setting up your randoms or anything, but I think you get the idea. Just have the second value be equal to the first value instead of making it random.

Yeah, but it’s two different .swf files and an HTML file, not all one file. I have to get that number from one .swf to the other, and then over to the .html.

I guess you could find that random variable with Flash and then send it to the HTML with Javascript. I think you’ll find what you’re looking for here: http://www.kirupaforum.com/showthread.php?s=&threadid=1242

It’s possible to go the other way around, but I don’t know how exactly…

pom :asian:

That sounds like what I want to do…

I think I’m going to have to learn a few new tricks here, but I suppose that’s not technically a bad thing.