dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Help with randomizing

  1. #1
    Member
    Join Date
    Nov 2000
    Posts
    65

    Help with randomizing

    I did this a long time ago, but seemed to have lost the script.

    What I'm trying to do is create a flash movie, that upon load, it will show a random image or movie clip, then have the movie scroll through a series of 7 or 8 other images or clips.

    So each time a viewer comes to the site, it will be a random first image/clip they see, then it will scroll through the others in approx. 5 second intervals, fading in and out, etc...

    Could anyone give me a hand!?

    thanks!

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Posts
    1,804
    random(20)-10;
    This will give a random number between 10 and -10
    .

  3. #3
    Member
    Join Date
    Apr 2003
    Location
    Singapore
    Posts
    74
    Or this:
    Math.round(Math.random()*20)-10
    This will give a random integer between -10 and 10.
    My DeviantART gallery of drawings and games.

  4. #4
    Member
    Join Date
    Nov 2000
    Posts
    65
    Thanks for the replies. I guess I probably need a bit more help. Where should I put that script? On the first frame of the movie I assume? But how does it reference the images/clips?

  5. #5
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Removing any helpful previous posts I mistakenly contributed to these forums.

    See ya FK'ers
    Last edited by NTD; 10-19-2006 at 06:12 AM.

  6. #6
    Junior Member
    Join Date
    Mar 2003
    Location
    Midwest US
    Posts
    10
    Quote Originally Posted by jpalopoli
    I did this a long time ago, but seemed to have lost the script.

    What I'm trying to do is create a flash movie, that upon load, it will show a random image or movie clip, then have the movie scroll through a series of 7 or 8 other images or clips.

    So each time a viewer comes to the site, it will be a random first image/clip they see, then it will scroll through the others in approx. 5 second intervals, fading in and out, etc...

    Could anyone give me a hand!?

    thanks!
    Hey jpalopoli,

    When you get this working would you mind shooting me the .fla? I need exactly what you are putting together. Certainly would appreciate it

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