Results 1 to 2 of 2

Thread: 2Flvs 1player

  1. #1

    2Flvs 1player

    i have 2 flvs .i dont know . how will play 2 flvs 1 flv player in random method.

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79
    You'll need to be able to write actionscript. Here's what I would do:

    Create a random number generator which returns either the number 1 or 2 (you may need to do a search for how to generate random numbers in Flash).

    Create a variable to be the name of the file to play (in the example below I've used the variable name filetoplay). If the random number is 1, set the variable to the first file name, otherwise to the second.

    Code:
    filetoplay = "";
    if (randomfile = 1) {
    filetoplay = "firstfile.flv";
    } else {
    filetoplay = "secondtfile.flv";
    }
    Then use the variable filetoplay as the file name in whatever code you use to play the file.
    Dave Owen
    MediaCollege.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube