SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Texas
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Loading Random External Movie Clips?

    I have five Flash 4 .swf files separate from my main movie. I know that to load one of them, I need to use an empty movie clip. But is it possible to load any one of the five randomly from that empty movie clip in my main movie?

    Thanks so much!
    Are you an 80s child?
    http://www.80schildren.com

  2. #2
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, try this...

    Code:
    url = "someMovie" + Math.round(Math.random()*4) + ".swf";
    loadMovieNum (url, 1);
    Math.round(Math.random()*2) returns a random number from 0-4

    loadMovieNum loads one of the following swf's into level 1

    someMovie0.swf
    someMovie1.swf
    someMovie2.swf
    etc.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2001
    Location
    Texas
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PERFECT!

    Thanks so much!!
    Are you an 80s child?
    http://www.80schildren.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
  •