A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How do I make a diff loop come up evertime the user refreshes the flash?

  1. #1
    Junior Member
    Join Date
    May 2001
    Posts
    7
    I just wanna know how i can make diff dynamic sounds come up like if i have 3 diff waves. ex. a.wav, b.wav, c.wav and i want to play a diff one each time the flash loads up.. if someone can tell me pleaze post...

  2. #2
    Stick In The Mud
    Join Date
    Oct 2000
    Posts
    752
    hi there,
    well if have your sounds in separate swfs (eg. so1.swf, so2.swf..etc), then you could use the random() function to pick a different sound everytime it loads.. eg.

    numsongs=3;
    ran = 1+Math.floor(Math.random()*numsongs);
    loadMovie("so"+ran+".swf",_root.SonConMC);

    hope this helps,
    Andy

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