A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Random

Hybrid View

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    1

    Question

    I know how to get a random number. But How can I get a Random number from a variable, like this

    Random(/:number)

    HELP!!!!

    Thanx

    Misja

  2. #2
    Hack
    Join Date
    Mar 2000
    Location
    Madison, WI
    Posts
    1,753

    Post

    Misja,

    I don't think you can use a variable directly in the Random () command, but here's a workaround.

    "x" = Int (Random (100) * vbl / 100)

    Where vbl defines the range of the random number. If vbl = 10, "x" will be a random integer from 0-9.

    Erlenmeyer


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