A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: use of random

  1. #1
    Junior Member
    Join Date
    Mar 2001
    Posts
    18
    hello, can anyone help me.
    I need five movie clips to race each other.
    This is the random part of the script I am
    currently using:

    tellTarget ("_root.run") {
    m1go = random (8)+2;
    m2go = random (8)+2;
    m3go = random (8)+2;
    m4go = random (8)+2;
    m5go = random (8)+2;
    }

    The problem is some of the variables get assigned the same value.
    i.e. m1go = 6
    m3go = 5
    m5go = 6

    here the random has given m1go and m5go the same value.
    Is there a way of making sure they each get a different value?

    Your help will be very, very much appreciated

    thanks

    Dogmatix

  2. #2
    Senior Member
    Join Date
    Mar 2001
    Posts
    519
    Check out Stickman's tutorial at

    http://www.the-stickman.com/tutorial...uerandom.shtml

    You should find everything you need there

    A

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