flash - Alternate sources of randomness in ActionScript 2.0 -


I write a piece of software that runs within banner ads, which creates millions of session IDs every day a long time For I know that the random number generator in Flash is not enough to make enough unique IDs, so I have employed several tricks to get even more random numbers. However, this is not easy in Action Script 2.0, and I am seeing more and more conflicts, so I wonder if I have something to ignore.

As far as I get this problem Math.random () this system gets priority over time, and when you have enough efforts together, then some Conflicts occur.

In Action Script 3.0 I use the value returned by System.totalMemory as a little extra randance, but there is no equivalent in Action Script 2.0. AS3 also has font.immount font , and some other things that are different from the system in the system

I am not completely random at all, just something that is randomized randomly Is enough to reduce which I get from Math.random () . Think of it this way: There is a certain chance that two people will create the same random number sequence using only Math.random () , but the chance of creating two people the same sequence And , the exact list of fonts is too low.

I can not depend on using enough code to use ExternalInterface , the user agent or the URL of the page. I do not have to suggest how to AS3 in AS3, or any other system, or server side - only by using what's available in standard API.

On the server side, I also have an IP address on session ID, but it is not enough (for example, many big companies use a single proxy server and this means that thousands of people have a Is the only IP - and since they focus on the same sites, with the same advertisement, many session IDs are collapsed at almost the same time). Doing more on the server side, for various reasons, is not practical. For example, I can not generate random numbers on the server side, and I will send it to the client, even if I want to be able to solve it in a very similar manner.

The best I've ever come to use is the list of microfons ( microphone.name ), but in some code I have to type in System.capabilities I have also tried to use some fingerprint, I am not sure how much randomness I can get, though I am not using that time. I hope I have ignored something.

I apologize for coming in the form of arrogant in my comments for your answers, but please, if you do not know Action Script 2.0, or know how the pseudo random number generator works Do not try to answer, it will not help and I will give downvotes. I really appreciate the proper answer, though.

coded as 2.0, but after considering system.totalMemory, a possible approach This system may have some variation in the system to measure the speed of the display and / or the connection, so maybe if you add some of these values, you can make the monastery random.

I am thinking on the lines of something like this:

  var init_ms: number = getTimer (); Var dummy: loaders = new loaders (); Dummy.oddata = function (success: boolean): zero {trace (init_ms); Trace (getTimer ()); Var elapsed_ms: number = getTimer () - init_ms; Trace ("elapsed_mc:" + elapsed_ms); } Dummy.load ("http://www.example.com/dummy"); Var counter: number = 0; This.onEnterFrame = function (): zero {counter ++; If (counter> = 20) {var elapsed_ms: number = getTimer () - init_ms; Trace ("elapsed_mc:" + elapsed_ms); This.onEnterFrame = null; }};  

I do not know what works in AS 2.0 as cross domain policies, but I think the above code cross domain. XML will attempt to download; Not sure that you will not be allowed to load external content with a banner, though.

The second can also give you some randomness, because the time between the time of the frame is not exactly accurate and there are some differences from the machine to the machine and even the same machine.

Hope it helps.


Comments