# Equal random values in multiple projects

**URL:** https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577
**Category:** flash
**Created:** [August 13, 2002, 5:03pm UTC](https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577 "2002-08-13T17:03:45Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![liveacoustic](https://avatars.discourse-cdn.com/v4/letter/l/9fc29f/32.png) [@liveacoustic](https://forum.kirupa.com/u/liveacoustic)
#### Post date: [August 13, 2002, 5:03pm UTC](https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577/1 "2002-08-13T17:03:45Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2002, 5:31pm UTC](https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577/2 "2002-08-13T17:31:42Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2002, 5:51pm UTC](https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577/3 "2002-08-13T17:51:07Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2002, 5:51pm UTC](https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577/4 "2002-08-13T17:51:18Z")

</div>

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](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:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 13, 2002, 7:42pm UTC](https://forum.kirupa.com/t/equal-random-values-in-multiple-projects/4577/5 "2002-08-13T19:42:07Z")

</div>

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.

Thanks.
