A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: A real random number

  1. #1
    Member
    Join Date
    May 2002
    Posts
    54
    Does anyone know how to get a real random number? I've used Math.random(); but that only gives me a number between 0 and 1. Can anyone help me?

  2. #2
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    r = int(Math.random() * 10 + 1);
    //gimme a number 'tween 1 and 10

    r= int(Math.random() * n + lowNumber);
    // gimme a number 'tween lowNumber and n

    Good Luck !

  3. #3
    Member
    Join Date
    May 2002
    Posts
    54

    Thanks

    Just wanted to say thanks.

  4. #4
    HELP>>>ACTIONSCRIPT DICTIONARY
    Join Date
    Feb 2000
    Location
    In the Present Moment
    Posts
    1,041
    My pleasure!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center