A Modified Flash Random Number Generator

December 24, 2010
By

A few weeks ago, I was tasked to create a little program that would generate a random set of numbers in a specified range for a Christmas party in a very limited time (in a span of less than 4 hours).

A quick search in Google showed Flanture’s random number generator. It had 3 digits and when the roll button was pressed, a random number from 000 to 999 would be generated.

I wanted more flare and some fancy effects to go with the random number generator (for one, I needed a specific range of random numbers). And it was a 4 digit number, not just a 3 digit number.

Modifying the flash and actionscript was simple enough.

I added some modifications to add flashvars to the original code such as:
ftitle: Title shown to the flash app (value below is “Christmas Raffle”)
minval: minimum value in the range to be shown (value below is “3000″)
maxval: maximum value in the range to be shown (value below is “5000″)

If you want the modified source code (with other effects and range of random numbers), you can get the source code here.

 
 

Tags: , ,

3 comments on “A Modified Flash Random Number Generator

  1. Nathaniel on said:

    hey

    the link to the modified generator only contains the swf file

  2. clintcan on said:

    Hey Nathaniel,

    Sorry about that – the code is uploaded now.

  3. ravi on said:

    this work is awesome plz send a generator with 2 digits and starts stop limits

Leave a Reply

Your email address will not be published. Required fields are marked *

*

HTML tags are not allowed.